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

Misleading variable 'operation' #2645

Open
arpitjindal97 opened this issue Aug 10, 2022 · 0 comments
Open

Misleading variable 'operation' #2645

arpitjindal97 opened this issue Aug 10, 2022 · 0 comments
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelhttp

Comments

@arpitjindal97
Copy link

My understanding is it defines the task that an HTTP handler tends to do in a particular API call.

Example:

otelhttp.NewHandler(SearchQuery, "/search")
otelhttp.NewHandler(GetA, "/getA")
otelhttp.NewHandler(PostA, "/PostA")
otelhttp.NewHandler(Test, "Operation")

But looking at the implementation otel has done. It means server_name. In the final metrics, it's displayed as http_server_name

image

Is this the expected behavior? or maybe I'm missing something. Let me know how can endpoint-specific metrics be collected.

Reference:

https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/net/http/otelhttp/handler_example_test.go#L98-L101

https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/net/http/otelhttp/handler.go#L207-L212

https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/internal/http.go#L209-L219

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

No branches or pull requests

2 participants