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

Ensure semantic conventions are up to date #2600

Closed
bogdandrutu opened this issue Mar 3, 2021 · 16 comments
Closed

Ensure semantic conventions are up to date #2600

bogdandrutu opened this issue Mar 3, 2021 · 16 comments
Assignees
Labels
area:miscellaneous help wanted Good issue for contributors to OpenTelemetry Service to pick up priority:p2 Medium release:required-for-ga Must be resolved before GA release

Comments

@bogdandrutu
Copy link
Member

We should build a tool or share a tool with opentelemetry-go for all semantic conventions.

/cc @MrAlias @punya

@bogdandrutu bogdandrutu added help wanted Good issue for contributors to OpenTelemetry Service to pick up area:miscellaneous labels Mar 3, 2021
@bogdandrutu
Copy link
Member Author

@MrAlias @punya so to understand there is no such thing :)) Maybe we should start talking about building this.

@MrAlias
Copy link
Contributor

MrAlias commented Mar 10, 2021

@MrAlias @punya so to understand there is no such thing :)) Maybe we should start talking about building this.

Sure, I'm onboard. What does this entail? Should we schedule a meeting, or can it be done asynchronously here?

@MrAlias
Copy link
Contributor

MrAlias commented Mar 10, 2021

Currently we use the hand-crafted semconv package to contain all the semantic conventions. There are some curated comments in there that help relate the semantic conventions to OTel Go implementation concepts. It would be ideal if the thing we build could preserve these types of comments.

@punya
Copy link
Member

punya commented Mar 10, 2021

There are some existing tools that process the semconv yaml files: https://github.com/open-telemetry/build-tools/blob/main/semantic-conventions/README.md. It looks like they are already being used for Java codegen. @bogdandrutu were you thinking about extending that tooling with a new Jinja template, or building something else?

@jrcamp jrcamp added the priority:p2 Medium label Mar 10, 2021
@jrcamp jrcamp added this to the Phase2-GA-Roadmap milestone Mar 10, 2021
@alolita
Copy link
Member

alolita commented Mar 18, 2021

@rakyll are you looking at this - can you share your doc / thoughts here?

@rakyll
Copy link
Contributor

rakyll commented Mar 19, 2021

There is a spec change related to this: open-telemetry/opentelemetry-specification#1515

@alolita
Copy link
Member

alolita commented May 11, 2021

@bogdandrutu please advise on next steps given this would be important to implement before GA.

@Aneurysm9 can we reuse the Go semantic conventions that you've been adding support for in the Go API/SDK as a common package in Go that the Collector can use too?

@bogdandrutu
Copy link
Member Author

@Aneurysm9 I think we should share the generated semconv if go library has already this. We can do the following:

  1. Rename the go-proto repo to go-shared and expose multiple modules there like:
    a. protos
    b. semconv
    c. pdata (for collector and other users)
  2. Change the vanity URL so we don't break the current proto package.

Otherwise we can ask for a different repo as well.

@MrAlias
Copy link
Contributor

MrAlias commented May 17, 2021

I like the idea of having a new repository dedicated to the semconv package. I'm in favor of something like opentelemetry-semantic-conventions-go being created to house the package and generation tooling and pointing at that with go.opentelemetry.io/semconv.

I think isolating the purpose of each repository (i.e. protos and semantic conventions) will promote cohesive and single-focused Go packages.

@alolita alolita added the release:required-for-ga Must be resolved before GA release label May 18, 2021
@alolita
Copy link
Member

alolita commented May 20, 2021

@Aneurysm9 - can you provide your recommendations used for the Go API/SDK which we can reuse here? Thx.

@Aneurysm9
Copy link
Member

I'm with @MrAlias in thinking that a new repo with a new vanity URL would be the way to go. I think the generation tooling we recently added to the Go repo can easily be moved elsewhere.

The one problem I see that we'll need to work through is that the semconv package currently depends on the attribute package from the API as all of the conventions are defined as attribute.Keys or attribute.KeyValues. The attribute package has a dependency on an internal package, but it's just for a few conversion helpers that can easily be moved/duplicated. Moving that package will cause a lot of churn, but probably less than the two times we've previously renamed it.

I've put this topic on the agenda for the Go SIG meeting today.

@MrAlias
Copy link
Contributor

MrAlias commented May 27, 2021

From the Go SIG:

Currently the semconv package represents the semantic conventions with our attribute package KeyValue type. Would it be okay to keep the generation in this type? Would the collector be okay transforming from these to the pdata format?

Would it make more sense to just move the generation code to a separate repo?

@bogdandrutu @tigrannajaryan

@alolita
Copy link
Member

alolita commented Jun 14, 2021

@MrAlias Having the generation code to a separate repo would help in both the Go library and the Collector being able to leverage the same package. @bogdandrutu had mentioned this strategy could be reused in the long run for all Go components.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 15, 2021

@MrAlias Having the generation code to a separate repo would help in both the Go library and the Collector being able to leverage the same package. @bogdandrutu had mentioned this strategy could be reused in the long run for all Go components.

I'm not sure I understand what is being said here.

I agree that unifying the location of shared code is a good idea.

Do we want to put the generation code in the repository or the generated code? If it is the generated code, would the collector be okay with that code using "go.opentelemetry.io/otel/attribute".KeyValue type to represent the conventions?

@alolita
Copy link
Member

alolita commented Jun 17, 2021

Based on the Collector SIG discussion today, the Go library and Collector maintainers will sync to finalize next steps in setting up a common repo as proposed by @Aneurysm9 to reuse common packages between Go based code bases.

@alolita
Copy link
Member

alolita commented Aug 6, 2021

@bogdandrutu Have you signed off on all the items that need to be completed for this task? I can close the issue if you sign off. Thx.

hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this issue Jul 5, 2024
This way it applies to local builds as well as CI builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:miscellaneous help wanted Good issue for contributors to OpenTelemetry Service to pick up priority:p2 Medium release:required-for-ga Must be resolved before GA release
Projects
None yet
Development

No branches or pull requests

8 participants