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

semconv: Add metric generation #4528

Closed
pellared opened this issue Sep 18, 2023 · 3 comments · Fixed by #4880
Closed

semconv: Add metric generation #4528

pellared opened this issue Sep 18, 2023 · 3 comments · Fixed by #4880
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request help wanted Extra attention is needed pkg:semconv Related to a semconv package
Milestone

Comments

@pellared
Copy link
Member

pellared commented Sep 18, 2023

Generate semconv's type: metric.
E.g. the following could be generated (at least the instrument name, but maybe something that creates a whole instrument would be better? but it may be too complex): https://github.com/open-telemetry/semantic-conventions/blob/e880bddb63437119a33caddd643e069b500851a6/model/metrics/http.yaml#L91C1-L96

The new functionality could be used e.g. here: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/f44f5ad46d64fb5f1d8615bfea479ed29ac540dc/instrumentation/google.golang.org/grpc/otelgrpc/config.go#L75-L77

@pellared pellared added enhancement New feature or request pkg:semconv Related to a semconv package area:metrics Part of OpenTelemetry Metrics labels Sep 18, 2023
@pellared pellared added the help wanted Extra attention is needed label Jan 16, 2024
@carrbs
Copy link
Contributor

carrbs commented Jan 17, 2024

I have attempted a variety of arguments to semconvgen with no success so I likely need a bit more guidance. I tried following the directions here: https://github.com/open-telemetry/opentelemetry-go/blob/main/RELEASING.md and running it manually from .tools/. I was trying many different values to try and get the generator to read the metrics/http.yaml, but it felt like it was reading everything but that file in the metrics directory :)

Perhaps I am not going the correct direction on this though.

Here is an example of what I was attempting:

➜ ./semconvgen -i "/Users/ben/after_work/otel/semantic-conventions/model/." --only=metric -p conventionType=metric -s "v1.24.0" -t ../semconv/template.j2 -f metric.go

@pellared
Copy link
Member Author

I have no idea. Probably you would have to debug it.

Here is the source code of semconvgen (written in Go).
Here is the source code of otel/semconvgen (written in Python) which is used as a docker container by semconvgen (written in Go).

@carrbs
Copy link
Contributor

carrbs commented Jan 17, 2024

I have no idea. Probably you would have to debug it.

Here is the source code of semconvgen (written in Go).
Here is the source code of otel/semconvgen (written in Python) which is used as a docker container by semconvgen (written in Go).

This was my next guess, just wanted to make sure I was headed in the right direction, thanks @pellared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request help wanted Extra attention is needed pkg:semconv Related to a semconv package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants