Make SemanticConventions.cs Public
See original GitHub issueFeature Request
Is your feature request related to a problem?
I have had to copy the SemanticConventions constants class containing open telemetry attribute names because it is marked as internal.
Describe the solution you’d like:
Please make it public. I would like to add additional tags to my Activity
. This may be difficult because it’s a linked file in a lot of projects.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Semantic Conventions
OpenTelemetry defines Semantic Conventions (sometimes called Semantic Attributes) that specify common names for different kinds of ...
Read more >Get started with semantic analysis
This tutorial provides an overview of working with semantic analysis using the .NET Compiler SDK.
Read more >Semantic Versioning 2.0.0 | Semantic Versioning
Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation....
Read more >Naming convention (programming)
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote...
Read more >Difference Between Syntax and Semantics
Syntax: It refers to the rules and regulations for writing any statement in a programming language like C/C++.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suggest switching to using the code generator (https://github.com/open-telemetry/build-tools/tree/master/semantic-conventions) instead of hand-coding the semantic conventions so that the names are consistent with other languages.
Since you asked for other languages, here is Java: https://github.com/open-telemetry/opentelemetry-java/blob/838be8ef8ee501a81fcd666812393955eddcde85/api/all/src/main/java/io/opentelemetry/api/trace/attributes/SemanticAttributes.java (generator script at https://github.com/open-telemetry/opentelemetry-java/blob/master/buildscripts/semantic-convention/generate.sh)
I think all languages should eventually expose semantic conventions, as it should be easy to use them. But note that unlike the Trace API spec, semantic conventions are not yet frozen in the spec (like the Trace SDK spec).
Hey, thanks for starting this. I also started this today 😃 We are basically at the same point. Given that you actually provided a link to something viewable I’ll let you take it.
I personally think we just need the const/enum values. So I think the class generation is basically fine. Ultimately I think we want to create a NuGet package for the various projects to reference called OpenTelemetry.SemanticConventions (unless someone has a better name). We want to expose the generated values in a NuGet package and remove the existing SemanticConventions class.
I see the generation happening on-demand locally first, dumping generated files into a new NuGet project, building the package, and testing it against the current projects. At that point, we could either generate the package on demand via a CI pipeline, passing it the released tag version of the spec, and publish the package. Or we can continue generating on-demand and checking the generated files via a normal PR.
The version of the new package should match the spec version we used to generate.