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

Add schema URL support #2417

Open
cijothomas opened this issue Sep 27, 2021 · 6 comments
Open

Add schema URL support #2417

cijothomas opened this issue Sep 27, 2021 · 6 comments
Labels
metrics Metrics signal related needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package
Milestone

Comments

@cijothomas
Copy link
Member

cijothomas commented Sep 27, 2021

Spec requires Meter, Tracer(ActivitySource) to have a 3rd parameter schemaUrl.
https://github.com/open-telemetry/opentelemetry-specification/pull/1666/files

As both these classes are part of .NET Runtime, we need to request this change in .NET Runtime repo. Opening an issue here first to see if there is any alternatives in the meantime, and to track this (for consideration in next .NET release)

@cijothomas cijothomas added enhancement New feature or request needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package labels Sep 27, 2021
@cijothomas cijothomas added metrics Metrics signal related and removed enhancement New feature or request labels Dec 2, 2021
@cijothomas
Copy link
Member Author

related spec PR: open-telemetry/opentelemetry-specification#2180

@cijothomas
Copy link
Member Author

Once the semantic conventions becomes stable, the instrumentation libraries can go stable. But they'll need schema_url support to point to the version of the semantic conventions its implementing.

@samsp-msft
Copy link

samsp-msft commented Sep 27, 2023

Seems like a potential dupe of #4316 - If we added a dictionary to Meter and ActivitySource you can use a well-known key name for the URL. There is an existing precedent in the Resource API which is a dictionary and semantic conventions for the key names.

@pellared
Copy link
Member

pellared commented Oct 13, 2023

How are you planning to stabilize any instrumentation library or resource detector without this feature?

If the telemetry producers do not set the schema URL then they fall into "Fixed Schema Telemetry Producers" and therefore:

Instrumentations that are labeled Stable and do not include the Schema URL in the produced telemetry are called Fixed Schema Telemetry Producers.

Such instrumentations are prohibited from changing any produced telemetry. If the specification changes over time and the semantic conventions are updated, the instrumentation is still prohibited from adopting the changes.

Source: https://opentelemetry.io/docs/specs/otel/telemetry-stability/

This feature is required by the specification for a very long time.
See:

@open-telemetry/dotnet-maintainers

Related comment: dotnet/runtime#63651 (comment)

@cijothomas
Copy link
Member Author

Seems like a potential dupe of #4316 - If we added a dictionary to Meter and ActivitySource you can use a well-known key name for the URL. There is an existing precedent in the Resource API which is a dictionary and semantic conventions for the key names.

Not really a duplicate issue. This is still a separate issue, but it is possible to use a well known key in the Meter level tags and store schema_url there, and provide extension method (In OTel) like meter.GetSchemaUrl() which retrieves it from the well known key. I don't think such a thing was done in Resource, but we have done it for Activity.Status.

Copy link
Contributor

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 15, 2024
@Kielek Kielek added this to the Future milestone Oct 15, 2024
@Kielek Kielek removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics Metrics signal related needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package
Projects
None yet
Development

No branches or pull requests

4 participants