[Repo Assist] refactor(tracing): unify semconv import to v1.34.0 in span_helpers#6853
Merged
lpcox merged 1 commit intoJun 1, 2026
Merged
Conversation
span_helpers.go and span_helpers_test.go imported semconv/v1.27.0 while every other file in internal/tracing/ used semconv/v1.34.0. Both versions expose URLPathKey identically (url.path), so this is a zero-risk change that eliminates mixed schema URL inconsistency in exported traces. No go.mod changes required — semconv/v1.27.0 and v1.34.0 are both sub-packages within the existing go.opentelemetry.io/otel v1.43.0 module. Addresses recommendation from #6841 (Go Fan review). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Unifies OpenTelemetry semantic convention (semconv) imports in internal/tracing/ by updating span_helpers.go and its test to use go.opentelemetry.io/otel/semconv/v1.34.0, matching the rest of the tracing package and avoiding mixed SchemaURL values in exported spans.
Changes:
- Switch
semconvimport ininternal/tracing/span_helpers.gofromv1.27.0tov1.34.0. - Switch
semconvimport ininternal/tracing/span_helpers_test.gofromv1.27.0tov1.34.0.
Show a summary per file
| File | Description |
|---|---|
| internal/tracing/span_helpers.go | Updates semconv import to v1.34.0 to keep span attributes/schema consistent with the rest of tracing. |
| internal/tracing/span_helpers_test.go | Aligns test semconv import with v1.34.0 to match production tracing code and avoid mixed versions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is a draft PR from Repo Assist, an automated AI assistant.
Addresses recommendation #1 from the Go Fan review in #6841.
Summary
span_helpers.goandspan_helpers_test.goimportedsemconv/v1.27.0while every other file ininternal/tracing/usedsemconv/v1.34.0. This creates a mixed schema URL inconsistency in exported traces — spans fromStartDIFCPipelineSpanandStartProxyForwardSpanwould carry the v1.27.0 schema URL while all other spans use v1.34.0.Root Cause
The
span_helpers.gofile was created when the project was on semconv v1.27.0, and wasn't updated when the rest of the tracing package was upgraded to v1.34.0.Fix
Change the import alias in both files:
URLPathKey(url.path) is defined identically in both versions — this is a zero-risk change.No
go.modchanges are needed:semconv/v1.27.0andv1.34.0are both sub-packages within the existinggo.opentelemetry.io/otel v1.43.0module.Trade-offs
SchemaURL: semconv.SchemaURLconsistently)v1.27.0sub-package becomes unused in the module and can be removed withgo mod tidyin a future passRelated: #6841
Test Status
proxy.golang.orgis blocked in this CI environment, preventinggo buildandgo testfrom running. However:gofmtparses both files without errorURLPathKeyhas been defined asurl.pathsince semconv v1.20.0 and the definition is unchanged in v1.34.0internal/tracing/source files already usev1.34.0successfullyWarning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgSee Network Configuration for more information.
Add this agentic workflows to your repo
To install this agentic workflow, run