Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Enable process level tags to be associated with the tracer #143

Merged
merged 2 commits into from
Apr 20, 2017

Conversation

objectiser
Copy link
Contributor

Inline with the new jaeger model, where tags can be associated with the process, this change enables some process level tags to be specified when building the Tracer.

@codecov-io
Copy link

codecov-io commented Apr 20, 2017

Codecov Report

Merging #143 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #143      +/-   ##
============================================
+ Coverage     36.18%   36.24%   +0.06%     
  Complexity      598      598              
============================================
  Files            94       94              
  Lines          6343     6349       +6     
  Branches       1052     1052              
============================================
+ Hits           2295     2301       +6     
  Misses         3866     3866              
  Partials        182      182
Impacted Files Coverage Δ Complexity Δ
...ger-core/src/main/java/com/uber/jaeger/Tracer.java 85.29% <100%> (+0.53%) 15 <1> (ø) ⬇️

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 b06e541...48cd51c. Read the comment docs.

@@ -89,7 +90,6 @@ private Tracer(

this.version = loadVersion();

Map<String, Object> tags = new HashMap<String, Object>();
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 it is better to create a new map and add all tags from the parameter tags, rather than taking the ownership of the map created outside of the constructor.

Copy link
Member

Choose a reason for hiding this comment

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

actually, never mind, the map is owned by the builder, so it's fine

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.

@pavolloffay Note that this will have to change because process-level tags are not sent as regular tags on every Span, but only in the Process object in the reported batch.

@pavolloffay
Copy link
Member

@yurishkuro thanks, I will handle it. How are we going to handle this in zipkin? Add to each/first in the process span?

@yurishkuro
Copy link
Member

Yes, in Zipkin we used to add them to first-in-process span only, to minimize the span size. It was a bit confusing to people. though.

@yurishkuro yurishkuro merged commit 999283e into jaegertracing:master Apr 20, 2017
@objectiser objectiser deleted the tracertags branch April 20, 2017 16:48
@@ -370,8 +371,23 @@ Builder withMetrics(Metrics metrics) {
return this;
}

Builder withTag(String key, String value) {
Copy link
Member

Choose a reason for hiding this comment

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

This should be public. I will change it in #142 in order to test it when corverting to thrift model.

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

Successfully merging this pull request may close these issues.

4 participants