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

Configuration class for BatchSpanProcessor #1080

Conversation

thisthat
Copy link
Member

@thisthat thisthat commented Apr 6, 2020

This addresses #996 creating a configuration class for the BatchSpanProcessor.
The ConfigBuilder class contains the common code that will be shared with other configuration classes.

@jkwatson
Copy link
Contributor

jkwatson commented Apr 8, 2020

This PR proposes replacing Builders with Config classes. Any idea what set of SDK entities would end up being converted over to Config-based creation?

@bogdandrutu
Copy link
Member

@jkwatson I think I posted in the issue what is the target

@bogdandrutu
Copy link
Member

@thisthat any progress on this? I think we added some ideas in the comments.

@thisthat
Copy link
Member Author

Sorry, I was pretty busy this week with internal stuff. I will work on this in the next days!

@codecov-io
Copy link

codecov-io commented Apr 14, 2020

Codecov Report

Merging #1080 into master will increase coverage by 0.13%.
The diff coverage is 92.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1080      +/-   ##
============================================
+ Coverage     85.54%   85.68%   +0.13%     
  Complexity     1085     1085              
============================================
  Files           138      138              
  Lines          3993     4037      +44     
  Branches        356      366      +10     
============================================
+ Hits           3416     3459      +43     
+ Misses          435      433       -2     
- Partials        142      145       +3     
Impacted Files Coverage Δ Complexity Δ
...metry/exporters/jaeger/JaegerGrpcSpanExporter.java 59.72% <0.00%> (ø) 4.00 <0.00> (ø)
...elemetry/sdk/trace/export/BatchSpansProcessor.java 94.35% <93.84%> (+2.62%) 10.00 <2.00> (+1.00)
...ntelemetry/sdk/trace/RecordEventsReadableSpan.java 84.15% <0.00%> (-1.10%) 45.00% <0.00%> (-1.00%)

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 b14a2dd...fc02ade. Read the comment docs.

@thisthat
Copy link
Member Author

After 957ecc2, I have two questions:

  1. Is it ok to normalize with lowercase and dot separation the lookup of variables? Currently, MY_ENV_VAR is the same as my.env.var which is the same as MY_env.VaR.

  2. Since the configuration for other classes will look like the same, do we want to have a single configuration class that holds all configuration parameters of OTel?

@carlosalberto
Copy link
Contributor

carlosalberto commented Apr 14, 2020

it ok to normalize with lowercase and dot separation the lookup of variables? ;)

I'd go with YES.

Since the configuration for other classes will look like the same, do we want to have a single configuration class that holds all configuration parameters of OTel?

Strong yes here - I think lots of these naming convention/config routines can be reused in other places. It can be done in a follow-up PR though.

@jkwatson
Copy link
Contributor

Not an expert of Zipkin, but overall looks great @jkwatson You need to add the new artifact to all/build.gradle too, btw ;)

Not sure why this comment ended up over here, @carlosalberto

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

I really like the direction of this PR.

@jkwatson
Copy link
Contributor

Is there a desire to have unified env vars across language implementations? If so, should we write a spec for these, for more widespread review?

@bogdandrutu
Copy link
Member

@thisthat this PR is on you now, we need fixes for the round of comments we have for the moment.

@thisthat
Copy link
Member Author

Is there a desire to have unified env vars across language implementations? If so, should we write a spec for these, for more widespread review?

I will open an issue in the spec after we are done with the configuration for all classes so I can provide the list of env vars we need. Regarding this topic, there is already an issue for setting the exporter host: open-telemetry/opentelemetry-specification#172

@bogdandrutu and @jkwatson, I have addressed your the suggestions, PTAL.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

I think we are up for a good start. More refactoring will come when we change the next class.

@jkwatson
Copy link
Contributor

Is there a desire to have unified env vars across language implementations? If so, should we write a spec for these, for more widespread review?

See open-telemetry/opentelemetry-specification#572

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

needs a rebase, but let's get this in and start the refactoring/cleanup

@carlosalberto
Copy link
Contributor

As this PR looks ready to be merged: shall we create an issue to keep track of the upcoming configuration refactoring, so we can use this all over our SDK components?

@jkwatson
Copy link
Contributor

As this PR looks ready to be merged: shall we create an issue to keep track of the upcoming configuration refactoring, so we can use this all over our SDK components?

I think the refactoring should come naturally by adding the rest of the configuration. I don't think we need a separate issue to track it.

@bogdandrutu
Copy link
Member

@jkwatson what about my comments? Do we want to get them fixed?

@jkwatson
Copy link
Contributor

@jkwatson what about my comments? Do we want to get them fixed?

Sure. I thought that since you had approved, that they had all been resolved. @thisthat could you respond to the last couple of @bogdandrutu 's comments?

@thisthat thisthat force-pushed the batchspanprocessor-config branch from 2a0a5b0 to fc02ade Compare April 22, 2020 06:44
@thisthat thisthat force-pushed the batchspanprocessor-config branch from fc02ade to 67a4741 Compare April 22, 2020 07:15
@thisthat
Copy link
Member Author

@jkwatson what about my comments? Do we want to get them fixed?

Sure. I thought that since you had approved, that they had all been resolved. @thisthat could you respond to the last couple of @bogdandrutu 's comments?

I totally agree with @bogdandrutu 's comment and I have addressed them!

@bogdandrutu bogdandrutu merged commit cfba55f into open-telemetry:master Apr 22, 2020
iNikem pushed a commit to iNikem/opentelemetry-java that referenced this pull request Apr 22, 2020
* Add config class for BatchSpanProcessor

* Implement Configuration for BatchSpanProcessor

* goJF after rebase
davebarda pushed a commit to davebarda/opentelemetry-java that referenced this pull request Apr 24, 2020
* Add config class for BatchSpanProcessor

* Implement Configuration for BatchSpanProcessor

* goJF after rebase
@jkwatson jkwatson added this to the May Release milestone May 1, 2020
iNikem pushed a commit to iNikem/opentelemetry-java that referenced this pull request May 3, 2020
* Add config class for BatchSpanProcessor

* Implement Configuration for BatchSpanProcessor

* goJF after rebase
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.

8 participants