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

Generate semconv package for 1.4.0 #1975

Closed
tigrannajaryan opened this issue Jun 8, 2021 · 9 comments · Fixed by #1987
Closed

Generate semconv package for 1.4.0 #1975

tigrannajaryan opened this issue Jun 8, 2021 · 9 comments · Fixed by #1987
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tigrannajaryan
Copy link
Member

Now that spec 1.4.0 is release we need to generate semconv 1.4.0 and update SDK's resource detectors to use it.

I can generate semconv/trace.go and semconv/resources.go using the generator but I don't know how to generate semconv/http.go, exception.go, etc.

@MrAlias @Aneurysm9 can you help?

@tigrannajaryan tigrannajaryan added the enhancement New feature or request label Jun 8, 2021
@MrAlias
Copy link
Contributor

MrAlias commented Jun 8, 2021

We should also document this process and decide on open-telemetry/opentelemetry-collector#2600

@tigrannajaryan
Copy link
Member Author

It is partially documented here https://github.com/open-telemetry/opentelemetry-go/blob/main/RELEASING.md#semantic-convention-generation but only says how to generate trace.go and resource.go.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 8, 2021

It is partially documented here https://github.com/open-telemetry/opentelemetry-go/blob/main/RELEASING.md#semantic-convention-generation but only says how to generate trace.go and resource.go.

Ah, gotcha. I missed that 👍

@MrAlias
Copy link
Contributor

MrAlias commented Jun 8, 2021

@tigrannajaryan I think the http.go and exception.go are hand crafted and not generated because they do not have yaml definitions. I think if you run the generator based on the docs you shared that you should accomplish all that we can with the generation.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 8, 2021

I see some yamls: https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/trace/http.yaml and https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/trace/exception.yaml

Interesting, I must have misunderstood the generation gap for these files then. @Aneurysm9 is going to have a lot more context here.

@Aneurysm9
Copy link
Member

they do not have yaml definitions.

I see some yamls: https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/trace/http.yaml and https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/trace/exception.yaml

Those are generated into trace.go. http.go contains two values we've used commonly in instrumentation that aren't in the conventions as an enumeration and some helper functions that can probably just be copied wholesale. exception.go includes a constant for the event name used with exceptions that could probably move closer to where it is used if it isn't going to be included in the conventions.

@tigrannajaryan
Copy link
Member Author

So do we just copy existing http.go and exeception.go and we should be good?

@Aneurysm9
Copy link
Member

Yeah, that's what I'm going to do. I'll have a PR up shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants