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

Specify metric name/tags via annotation #1096

Merged
merged 4 commits into from
Oct 1, 2018

Conversation

objectiser
Copy link
Contributor

Signed-off-by: Gary Brown gary@brownuk.com

Which problem is this PR solving?

Addresses #1075 (comment)

Only issue is that the metric field needs a name, empty string does not work, so have called the overall counter(success/error) 'calls'. If another word is preferred let me know.

Short description of the changes

Revert to using the annotation approach for defining metrics.

Signed-off-by: Gary Brown <gary@brownuk.com>
@codecov
Copy link

codecov bot commented Sep 29, 2018

Codecov Report

Merging #1096 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1096   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         140     140           
  Lines        6625    6621    -4     
======================================
- Hits         6625    6621    -4
Impacted Files Coverage Δ
storage/spanstore/metrics/decorator.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2aa771...1796547. Read the comment docs.

Signed-off-by: Gary Brown <gary@brownuk.com>
Responses metrics.Timer //used as a histogram, not necessary for GetTrace
ErrLatency metrics.Timer
OKLatency metrics.Timer
Errors metrics.Counter `metric:"calls" tags:"result=err"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we usually call this "requests"

"find_traces.calls|result=ok": 1,
"find_traces.calls|result=err": 0,
"get_services.calls|result=ok": 1,
"get_services.calls|result=err": 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the full name look like? Perhaps the operation name should be pushed into a tag as well: requests|operation=find_traces|result=ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good - the updated version is now:

jaeger_query_latency_bucket{operation="find_traces",result="err",le="0.005"} 0
jaeger_query_latency_bucket{operation="find_traces",result="ok",le="0.005"} 2
jaeger_query_requests{operation="find_traces",result="err"} 0
jaeger_query_requests{operation="find_traces",result="ok"} 2
jaeger_query_responses_bucket{operation="find_traces",le="0.005"} 2

Signed-off-by: Gary Brown <gary@brownuk.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be good to list the actual metric name changes in the changelog / breaking changes.

Signed-off-by: Gary Brown <gary@brownuk.com>
@yurishkuro yurishkuro merged commit 0cd8a07 into jaegertracing:master Oct 1, 2018
@ghost ghost removed the review label Oct 1, 2018
@objectiser objectiser deleted the metricannotation branch January 15, 2019 09:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants