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

Adding provider resets sampler #350

Closed
pbiggar opened this issue May 5, 2023 · 2 comments · Fixed by #351
Closed

Adding provider resets sampler #350

pbiggar opened this issue May 5, 2023 · 2 comments · Fixed by #351
Assignees
Labels
type: bug Something isn't working type: documentation Improvements or additions to documentation

Comments

@pbiggar
Copy link

pbiggar commented May 5, 2023

Versions

  • .NET runtime & version (eg .NET Core, .NET Framework): 6.0.300
  • Honeycomb OpenTelemetry Distribution: 0.18.0-beta

Steps to reproduce

  1. Add sampler to a TracerProviderBuilder
  2. Add honeycomb to the TracerProviderBuilder
    -> The sampler is no longer used (ShouldSample is no longer called)

Additional context

Does not happen when just adding a ConsoleExporter instead of honeycomb

Fixed by added the Sampler AFTER adding Honeycomb.

@pbiggar pbiggar added the type: bug Something isn't working label May 5, 2023
@JamieDanielson JamieDanielson added the status: oncall Flagged for awareness from Honeycomb Telemetry Oncall label May 5, 2023
@MikeGoldsmith
Copy link
Contributor

This is a known issue with the OpenTelemetry SDK builder pattern. There is no way to know if a sampler has already been set, so the last one always wins. Ideally, there was a sampler already set, it would warn to say it's being overwritten.

Unfortunately, other than documenting the behaviour, there isn't much we can do about it here as an Otel SDK decision.

@MikeGoldsmith MikeGoldsmith added type: documentation Improvements or additions to documentation status: good starter issue An issue that could be an on-ramp for a new contributor! status: help wanted Seeking more eyes and hands. and removed status: oncall Flagged for awareness from Honeycomb Telemetry Oncall status: good starter issue An issue that could be an on-ramp for a new contributor! status: help wanted Seeking more eyes and hands. labels May 10, 2023
@MikeGoldsmith MikeGoldsmith self-assigned this May 10, 2023
MikeGoldsmith added a commit that referenced this issue May 11, 2023
## Which problem is this PR solving?
Updates the readme with details on the OpenTelemetry SDKs builder
pattern and how it can lead to options set by the distro to be
overridden.

- Closes #350 

## Short description of the changes
Update README with OTel SDK builder pattern
@pbiggar
Copy link
Author

pbiggar commented May 11, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: documentation Improvements or additions to documentation
Projects
None yet
3 participants