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

Create BatchSpanProcessor from env in TracerProvider #445

Merged

Conversation

samschlegel
Copy link
Contributor

This allows for configuring BSP when just with_exporter is used, instead of requiring users to create the BSP themselves when they want to pull from the environment.

It's possible that maybe this isn't the best route to go, and should instead just have users of TracerProvider expose with_batch_exporter themselves and have people pass with_env up, but figured I'd throw this together as it was the simplest thing to get what we needed and start the conversation 😄

@samschlegel samschlegel requested a review from a team as a code owner January 29, 2021 00:26
crate::util::tokio_interval_stream,
tokio::time::sleep,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oddly, from_env switches these two last arguments :(

Copy link
Member

Choose a reason for hiding this comment

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

yeah that looks like an oversight, want to create a PR to fix that?

This allows for configuring BSP when just `with_exporter` is used, instead of requiring users to create the BSP themselves when they want to pull from the environment.
@samschlegel samschlegel force-pushed the tracerprovider-create-bsp-from-env branch from aee7248 to 0ff3ed5 Compare January 29, 2021 00:31
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #445 (0ff3ed5) into main (6e123c8) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #445      +/-   ##
==========================================
- Coverage   48.80%   48.78%   -0.02%     
==========================================
  Files          66       66              
  Lines        5450     5450              
==========================================
- Hits         2660     2659       -1     
- Misses       2790     2791       +1     
Impacted Files Coverage Δ
opentelemetry/src/sdk/trace/provider.rs 65.30% <ø> (ø)
...ntelemetry/src/sdk/metrics/aggregators/ddsketch.rs 76.95% <0.00%> (-0.20%) ⬇️

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 6e123c8...0ff3ed5. Read the comment docs.

Copy link
Member

@jtescher jtescher left a comment

Choose a reason for hiding this comment

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

Looks good

crate::util::tokio_interval_stream,
tokio::time::sleep,
Copy link
Member

Choose a reason for hiding this comment

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

yeah that looks like an oversight, want to create a PR to fix that?

@jtescher
Copy link
Member

We discussed the from_env situation a bit in #268, ideally env vars are picked up by default but haven't gotten around to updating yet

@jtescher jtescher merged commit cac9893 into open-telemetry:main Jan 29, 2021
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

3 participants