Skip to content

Conversation

uucloud
Copy link
Contributor

@uucloud uucloud commented Apr 9, 2025

Description (what this PR does / why we need it):

Dependency Updates
  • Updated github.com/google/uuid from v1.4.0 to v1.6.0
  • Upgraded OpenTelemetry dependencies to v1.29.0 (this is the last version that supports Go 1.21)
  • Updated github.com/go-logr/logr from v1.4.1 to v1.4.2
  • Updated golang.org/x/sys from v0.18.0 to v0.24.0
Tracing Improvements
  • [Breaking Change] Replaced deprecated semantic conventions with stable ones from the latest OpenTelemetry specification
  • Enhanced tracing attributes in span.go and span_test.go to include client/server context
  • Refactored peerAttr function to accept an isClient parameter for better attribute handling and to conform to the current semantic convention guidelines

These changes ensure our application follows the current best practices for distributed tracing and maintains compatibility with the latest OpenTelemetry standards.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 9, 2025
@uucloud uucloud force-pushed the feat/upgrade_trace_attr branch 2 times, most recently from 9d05797 to 76f5064 Compare April 9, 2025 09:46
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 9, 2025
@uucloud
Copy link
Contributor Author

uucloud commented Apr 11, 2025

@shenqidebaozi @Cluas Can you help take a look? It's mainly about upgrading otel tracing semconv and replacing deprecated attributes.

semconv.NetPeerIPKey.String("127.0.0.1"),
semconv.NetPeerPortKey.String("8080"),
semconv.NetworkPeerAddressKey.String("127.0.0.1"),
semconv.ServerPortKey.Int(8080),
Copy link
Member

Choose a reason for hiding this comment

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

Will this result in inconsistent final results, or is it just a change in method name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will result in inconsistent trace attributes, because some attributes have been deprecated in the latest version of OpenTelemetry and stable attributes have been provided, such as net.peer.ip

@uucloud uucloud force-pushed the feat/upgrade_trace_attr branch from 76f5064 to 41001d1 Compare April 18, 2025 07:14
@uucloud uucloud changed the title chore(deps): update dependencies and improve tracing attributes break(middleware): update dependencies and improve tracing attributes Apr 18, 2025
…tracing attributes

- Updated `github.com/google/uuid` from v1.4.0 to v1.6.0.
- Upgraded OpenTelemetry dependencies to v1.29.0.
- Updated `github.com/go-logr/logr` from v1.4.1 to v1.4.2.
- Updated `golang.org/x/sys` from v0.18.0 to v0.24.0.
- Enhanced tracing attributes in `span.go` and `span_test.go` to include client/server context.
- Refactored `peerAttr` function to accept an `isClient` parameter for better attribute handling.
- Replaced some deprecated semantic conventions.
@uucloud uucloud force-pushed the feat/upgrade_trace_attr branch from 41001d1 to 31f181d Compare April 23, 2025 14:01
shenqidebaozi
shenqidebaozi previously approved these changes Apr 24, 2025
@dosubot dosubot bot added the LGTM label Apr 24, 2025
@hawkingrei
Copy link
Member

/hold

@hawkingrei hawkingrei removed the LGTM label Apr 24, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 27, 2025
@ZheJun-Jiang
Copy link

Upgrading to OpenTelemetry v1.29.0 and replacing deprecated conventions is much needed. The peerAttr refactor with isClient looks good. Curious about any backward compatibility issues and would appreciate more tests if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants