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

Chore: Upgrade otel dependencies #967

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Chore: Upgrade otel dependencies #967

merged 2 commits into from
Apr 30, 2024

Conversation

marefr
Copy link
Contributor

@marefr marefr commented Apr 26, 2024

What this PR does / why we need it:
Upgrades otel dependencies. Supersedes #963 #965 #966

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

@marefr marefr self-assigned this Apr 26, 2024
@marefr marefr requested a review from a team as a code owner April 26, 2024 13:53
@marefr marefr requested review from wbrowne, andresmgot, oshirohugo and xnyo and removed request for a team April 26, 2024 13:53
Copy link
Member

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have only one comment but I have tested this and it LGTM! 🙌

Comment on lines +46 to +49
span.SetAttributes(
semconv.HTTPURL(req.URL.String()),
semconv.HTTPMethod(req.Method),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following have all been deprecated:

  • http.url
  • http.method
  • http.status_code

and http.content_length is not standard

https://opentelemetry.io/docs/specs/semconv/attributes-registry/http/#deprecated-http-attributes

This is the same in Grafana core:
https://github.com/grafana/grafana/blob/a4bb4c84002374f24cfc44efa42304e131353d89/pkg/infra/httpclient/httpclientprovider/tracing_middleware.go

but shall we maybe also add the new non-deprecated/standard ones alongside those (both in core and sdk)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I noticed and was considering to change this and use the https://github.com/open-telemetry/opentelemetry-go-contrib/blob/c44d632df195200dee20d76b9b486d0349bfa9ea/instrumentation/net/http/otelhttp/transport.go#L51 to standardize on things. However, I think the first step is to make Grafana reuse the SDK tracing middleware why I suggest to keep using the deprecated fields for now.

@marefr marefr merged commit 1bf15db into main Apr 30, 2024
4 checks passed
@marefr marefr deleted the chore_upgr_otel branch April 30, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants