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

Refactor ExtendedTracer, ExtendedSpanBuilder to reflect incubating API conventions #6497

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

jack-berg
Copy link
Member

ExtendedTracer, ExtendedSpanBuilder break with the pattern used elsewhere for experimental APIs in that they are implemented using concrete classes instead of as extended versions of the stable interfaces.

This makes it impossible to implement behavior which depends on internal state only accessible from the SDK. Refactoring this so I can add ExtendedTracer#enabled with a response that reflects whether the Tracer's scope config is enabled.

Also adds working code examples demonstrating the usage, instead of brittle non-compiled examples in the readme.

cc @zeitlinger

@jack-berg jack-berg requested a review from a team June 4, 2024 14:36
@zeitlinger
Copy link
Member

We could also consider promoting to stable now

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.

👍🏽

@jack-berg
Copy link
Member Author

We could also consider promoting to stable now

I'm supportive of that. The only thing that gives me pause is the SpanCallable, SpanRunnable interfaces. Would be preferable if we didn't introduce our own functional interfaces and could use Callable, Runnable instead. I understand that we loose type safety over the exception type, but could be worthwhile to have an API with types from standard java users are familiar with.

@jack-berg jack-berg merged commit d0b463d into open-telemetry:main Jun 6, 2024
15 checks passed
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