Skip to content

[Repo Assist] refactor(tracing): unify semconv import to v1.34.0 in span_helpers#6853

Merged
lpcox merged 1 commit into
mainfrom
repo-assist/improve-semconv-unify-v1.34-e66fa02b76a03770
Jun 1, 2026
Merged

[Repo Assist] refactor(tracing): unify semconv import to v1.34.0 in span_helpers#6853
lpcox merged 1 commit into
mainfrom
repo-assist/improve-semconv-unify-v1.34-e66fa02b76a03770

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 1, 2026

🤖 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.go and span_helpers_test.go imported semconv/v1.27.0 while every other file in internal/tracing/ used semconv/v1.34.0. This creates a mixed schema URL inconsistency in exported traces — spans from StartDIFCPipelineSpan and StartProxyForwardSpan would carry the v1.27.0 schema URL while all other spans use v1.34.0.

Root Cause

The span_helpers.go file 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:

// Before:
semconv "go.opentelemetry.io/otel/semconv/v1.27.0"
// After:
semconv "go.opentelemetry.io/otel/semconv/v1.34.0"

URLPathKey (url.path) is defined identically in both versions — this is a zero-risk change.

No go.mod changes are needed: semconv/v1.27.0 and v1.34.0 are both sub-packages within the existing go.opentelemetry.io/otel v1.43.0 module.

Trade-offs

  • Pure import path change; no API differences at the call sites
  • Eliminates mixed schema URL in OTel traces (all spans now report SchemaURL: semconv.SchemaURL consistently)
  • v1.27.0 sub-package becomes unused in the module and can be removed with go mod tidy in a future pass

Related: #6841

Test Status

⚠️ Infrastructure limitation: Network access to proxy.golang.org is blocked in this CI environment, preventing go build and go test from running. However:

  • gofmt parses both files without error
  • URLPathKey has been defined as url.path since semconv v1.20.0 and the definition is unchanged in v1.34.0
  • Both versions are sub-packages of the same Go module at the same version, so no module resolution is needed
  • All other internal/tracing/ source files already use v1.34.0 successfully

Generated by Repo Assist

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "proxy.golang.org"

See Network Configuration for more information.

Generated by Repo Assist · sonnet46 3.8M ·

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@851905c06e905bf362a9f6cc54f912e3df747d55

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>
@lpcox lpcox marked this pull request as ready for review June 1, 2026 15:00
Copilot AI review requested due to automatic review settings June 1, 2026 15:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 semconv import in internal/tracing/span_helpers.go from v1.27.0 to v1.34.0.
  • Switch semconv import in internal/tracing/span_helpers_test.go from v1.27.0 to v1.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

@lpcox lpcox merged commit 11b9f77 into main Jun 1, 2026
23 checks passed
@lpcox lpcox deleted the repo-assist/improve-semconv-unify-v1.34-e66fa02b76a03770 branch June 1, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants