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

Use tags in agent metrics #950

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

eundoosong
Copy link
Contributor

Signed-off-by: Eundoo Song [email protected]

Which problem is this PR solving?

Short description of the changes

jaeger_agent_tc_reporter_batch_size{format="jaeger"} 0
jaeger_agent_tc_reporter_batch_size{format="zipkin"} 0
jaeger_agent_tc_reporter_batches_failures{format="jaeger"} 0
jaeger_agent_tc_reporter_batches_failures{format="zipkin"} 0
jaeger_agent_tc_reporter_batches_submitted{format="jaeger"} 0
jaeger_agent_tc_reporter_batches_submitted{format="zipkin"} 0
jaeger_agent_tc_reporter_spans_failures{format="jaeger"} 0
jaeger_agent_tc_reporter_spans_failures{format="zipkin"} 0
jaeger_agent_tc_reporter_spans_submitted{format="jaeger"} 0
jaeger_agent_tc_reporter_spans_submitted{format="zipkin"} 0

@codecov
Copy link

codecov bot commented Jul 23, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #950   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         136    136           
  Lines        6322   6320    -2     
=====================================
- Hits         6322   6320    -2
Impacted Files Coverage Δ
cmd/agent/app/reporter/tchannel/reporter.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 933efb3...261f6f3. Read the comment docs.

@@ -34,19 +34,19 @@ const (

type batchMetrics struct {
// Number of successful batch submissions to collector
BatchesSubmitted metrics.Counter `metric:"batches.submitted"`
BatchesSubmitted metrics.Counter `metric:"tc-reporter.batches.submitted"`
Copy link
Member

Choose a reason for hiding this comment

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

  1. there is no need to add tc-reporter explicitly like that, since you can pass that string as the first argument to Namespace in L76 (see point 3 below).
  2. since the metrics are changing anyway, maybe we should rename them to use underscores, as we did with other backend metrics?
  3. I think historically tc was used to refer to tcollector, which was the TChannel name of the collector service (now it's jaeger-collector). When we implement Refactor Agent configuration #927, there will be a different type of reporter, e.g. grpc-reporter. Also, in some cases we internally run the agent with two reporters (using OtherReporters configuration of the builder), I don't even know if they distinguish their metrics. So my suggestion, at minimum, to rename this to tchannel-reporter, to make it more obvious what we're talking about, but we also need to figure out how metrics will work after Refactor Agent configuration #927.

cc @black-adder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. since the metrics are changing anyway, maybe we should rename them to use underscores, as we did with other backend metrics?

I can change it using underscore like tchannel_reporter. Just curious, the reason I kept using - is normalizer in jaeger-lib already replaces them. Don't we need it?
https://github.com/jaegertracing/jaeger-lib/blob/master/metrics/prometheus/factory.go#L109

Copy link
Member

Choose a reason for hiding this comment

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

actually I see that collector metrics are still using dots as separators, so never mind about understores

Copy link
Contributor Author

@eundoosong eundoosong Jul 24, 2018

Choose a reason for hiding this comment

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

Ok, thanks!

we also need to figure out how metrics will work after #927.

I'll keep eyes on this.

@eundoosong
Copy link
Contributor Author

  • Move tc-reporter to Namespace as first argument.
  • Rename to tchannel-reporter

@yurishkuro yurishkuro changed the title Change to tagged metrics in agent Use tags in agent metrics Jul 24, 2018
@yurishkuro yurishkuro merged commit ba7d9b8 into jaegertracing:master Jul 24, 2018
@yurishkuro
Copy link
Member

Thanks!

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.

3 participants