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

Decide on how to add schema version to automaticly registered instrumentation scope #820

Open
tsloughter opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@tsloughter
Copy link
Member

otel-erlang creates a Tracer for every OTP application based on its name and version at boot. A Tracer contains the Instrumentation Scope which has this name and version. An issue comes up now that this Scope is getting a schema url added to it. This is an important change and simplifies a lot when it comes to integrating an application and its dependencies that may follow different versions of the semantic conventions. But where do we get this url from for the schema at boot for each application?

Easiest solution is to just look for it in the application env and then users set this value in src/<app>.app.src and mix.exs respectively.

This isn't ideal because it means the user manually syncing that value with the version of the schema they are actually using in code, but since that isn't done in a single place (it isn't simply the version of the semconv they depend on, esp since we only have one version of the semconv in a project) it depends on what semconv they actually reference in any place in their code.

A wild option would be to define current_tracer as:

-define(current_tracer, opentelemetry:get_application_tracer(?MODULE, ?SCHEMA_URL)).

But then the user would always have to have included a header with SCHEMA_URL anywhere they use a tracer.

We'd have to do a _with_schema_url prefix to every macro to do this optionally. Meh.

@tsloughter tsloughter added enhancement New feature or request question Further information is requested labels Jan 20, 2025
@tsloughter tsloughter self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant