Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphite events do not work as documented. #24

Open
Gerrrr opened this issue Oct 3, 2024 · 0 comments
Open

graphite events do not work as documented. #24

Gerrrr opened this issue Oct 3, 2024 · 0 comments

Comments

@Gerrrr
Copy link
Contributor

Gerrrr commented Oct 3, 2024

Documented, expected behavior:

Post for each metric

$ curl -X POST "http://graphite_address/events/" \
    -d '{ 
      "what": "Performance Test", 
      "tags": ["perf-test", "daily", "my-product"],   
      "when": 1537884100,
      "data": {"commit": "fe6583ab", "branch": "new-feature", "version": "0.0.1"}
    }'

and get values from data in hunter output.

Actual behavior:

$ hunter analyze my-product.test --since=-10m
Fetching data from Graphite...
Traceback (most recent call last):
  File "/srv/hunter/bin/hunter", line 6, in <module>
    sys.exit(main())
  File "/srv/hunter/hunter/main.py", line 501, in main
    script_main(conf)
  File "/srv/hunter/hunter/main.py", line 602, in script_main
    analyzed_series = hunter.analyze(
  File "/srv/hunter/hunter/main.py", line 102, in analyze
    series = importer.fetch_data(test, selector)
  File "/srv/hunter/hunter/importer.py", line 135, in fetch_data
    events = self.graphite.fetch_events(
  File "/srv/hunter/hunter/graphite.py", line 163, in fetch_events
    return [
  File "/srv/hunter/hunter/graphite.py", line 164, in <listcomp>
    GraphiteEvent(event.get("when"), **ast.literal_eval(event.get("data")))
TypeError: __init__() missing 6 required positional arguments: 'test_owner', 'test_name', 'run_id', 'status', 'start_time', and 'end_time'

This happens because GraphiteEvent these keys - 'test_owner', 'test_name', 'run_id', 'status', 'start_time', and 'end_time' - are mandatory.

We should adjust README and, in addition, make these fields optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant