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

@opentelemetry/semantic-conventions constants differ from spec #3834

Closed
1 of 2 tasks
MikeQDev opened this issue May 25, 2023 · 7 comments
Closed
1 of 2 tasks

@opentelemetry/semantic-conventions constants differ from spec #3834

MikeQDev opened this issue May 25, 2023 · 7 comments
Labels
help wanted Extra attention is needed pkg:semantic-conventions spec-noncompliant An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug stale

Comments

@MikeQDev
Copy link

  • This only affects the JavaScript OpenTelemetry library
  • This may affect other libraries, but I would like to get opinions here first

Noticed a couple of inconsistencies between the trace semantic-conventions spec and the JS semantic-conventions package, particularly around messaging system attributes

Some of the attributes defined in @opentelemetry/semantic-conventions seem to be attribute namespaces, and several other attributes from the spec are not present in @opentelemetry/semantic-conventions

.NET seems to have similar inconsistencies (see open-telemetry/opentelemetry-dotnet#4101), while Java matches the spec closer

3 examples:

OTel Spec JS .NET Java
messaging.destination.name messaging.destination messaging.destination messaging.destination.name
messaging.message.id messaging.message_id messaging.message_id messaging.message.id
messaging.source.name N/A - not present N/A - not present messaging.source.name

Fairly new to contributing, but if a contribution is needed, I'll do my best to dive in (any guidance appreciated). I noticed there is a semconv build script in this repo, as well as a build tool for semantic-convention auto-generation mentioned in #2064

@Flarna Flarna added the help wanted Extra attention is needed label May 25, 2023
@Flarna
Copy link
Member

Flarna commented May 25, 2023

There were quite some changes done in the spec regarding this. e.g. the HTTP conventions show also some warning and hints regarding transition from old to new.

Seems now it's up to all of us to follow this changes. I added the help wanted label because I think such an adaption is quite some work and more hands are really welcome.

@pichlermarc pichlermarc added spec-noncompliant An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug pkg:semantic-conventions labels May 25, 2023
@MikeQDev
Copy link
Author

MikeQDev commented May 26, 2023

Started some work to upgrade to semconv v1.19.0 in a separate branch, following opentelemetry-java's implementation

I'll work on getting the test suite working, then update tests as needed

A couple of thoughts while proceeding:

  • Only updated semconv to v1.19.0; upgrading to v1.20.0,v1.21.0 may be a bit more than I have capacity for, based on the warnings/hints from the link @Flarna provided
  • Not sure if we want to hold off on this change until semantic conventions moves to https://github.com/open-telemetry/semantic-conventions
  • There is also a metric type in v1.19.0, however, I was unable to generate values from it

Thank you for the assistance; all is appreciated!

EDIT:
After re-reading the note,

Warning Existing HTTP instrumentations that are using v1.20.0 of this document (or prior):
SHOULD NOT change the version of the HTTP or networking attributes that they emit until the HTTP semantic conventions are marked stable (HTTP stabilization will include stabilization of a core set of networking attributes which are also used in HTTP instrumentations).

This seems like we should stick with our current semconv version until HTTP semconvs are stable? Will hold off on changes for now. Please LMK if I am misunderstanding, or if there's a different approach we should take

@daniel-white
Copy link

@Flarna have you all considered putting these into some meta format then code generating into all the libraries?

@Flarna
Copy link
Member

Flarna commented May 30, 2023

@daniel-white There are yaml files in the spec repo one could use instead the generated js files. But I doubt they are easier to consume. Or which sort of meta format do you have in mind here?

@daniel-white
Copy link

@daniel-white There are yaml files in the spec repo one could use instead the generated js files. But I doubt they are easier to consume. Or which sort of meta format do you have in mind here?

@Flarna oh I was meaning that meta format would be converted into typescript for release for the package. That way some tool/process could automatically update them when the yaml changes

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Jul 31, 2023
@github-actions
Copy link

This issue was closed because it has been stale for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed pkg:semantic-conventions spec-noncompliant An existing feature incorrectly or incompletely implements the OTel spec. May or may not be a bug stale
Projects
None yet
Development

No branches or pull requests

4 participants