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

RFC: Support OpenTelemetry tracer provider concept #115

Open
slashmo opened this issue Apr 1, 2023 · 0 comments
Open

RFC: Support OpenTelemetry tracer provider concept #115

slashmo opened this issue Apr 1, 2023 · 0 comments
Labels
0 - new Not sure yet if task is valid / going to be worked on

Comments

@slashmo
Copy link
Collaborator

slashmo commented Apr 1, 2023

Overview

OpenTelemetry has the notion of a TracerProvider, which is, as the name suggests, a way of obtaining multiple Tracers. A TracerProvider is configured with a sampler, processor, exporter, etc... Each Tracer obtained from this provider then uses this configuration and denotes a so-called "instrumentation scope":

A logical unit of the application code with which the emitted telemetry can be associated. It is typically the developer's choice to decide what denotes a reasonable instrumentation scope. The most common approach is to use the instrumentation library as the scope, however, other scopes are also common, e.g. a module, a package, or a class can be chosen as the instrumentation scope.

OpenTelemetry Spec: InstrumentationScope

A TracerProvider can be configured as the global one, thus making it available to instrumented libraries.

Swift Distributed Tracing Support

This concept is similar to our InstrumentationSystem, but instead of bootstrapping a single "unscoped" global tracer, it bootstraps a global tracer to obtain "scoped" tracers.

I'm keen on getting your thoughts on this to decide whether we want to embrace this OpenTelemetry concept or discard it from our API.

Alternatives considered

Supporting TracerProviders in swift-otel

The issue with only supporting TracerProviders in swift-otel is that instrumented libraries with built-in tracing support don't know about the implementation details of swift-otel, therefore making it impossible to correctly implement TracerProviders in swift-otel only.


See Also 📚

@slashmo slashmo changed the title Support OpenTelemetry tracer provider concept RFC: Support OpenTelemetry tracer provider concept Apr 1, 2023
@slashmo slashmo added the 0 - new Not sure yet if task is valid / going to be worked on label Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new Not sure yet if task is valid / going to be worked on
Projects
None yet
Development

No branches or pull requests

1 participant