Skip to content

[TT-16342] fix: update OTel tracing test scenarios for Go 1.25#8041

Merged
buger merged 1 commit intorelease-5.12from
fix/otel-scenario-attributes-5.12
Apr 16, 2026
Merged

[TT-16342] fix: update OTel tracing test scenarios for Go 1.25#8041
buger merged 1 commit intorelease-5.12from
fix/otel-scenario-attributes-5.12

Conversation

@buger
Copy link
Copy Markdown
Member

@buger buger commented Apr 16, 2026

Summary

  • Update 16 OTel tracing test scenario files to use new semantic convention attribute names
  • Go 1.25 + otelhttp v0.60.0 emits new attribute names (e.g., http.response.status_code instead of http.status_code, http.request.method instead of http.method, url.full instead of http.url, server.address instead of net.peer.name, etc.)
  • Backport scenario updates from master to fix CI failures on release-5.12

Attribute mapping

Old (pre-Go 1.25) New (Go 1.25+)
http.status_code http.response.status_code
http.method http.request.method
http.url url.full
http.scheme url.scheme
http.wrote_bytes http.response.body.size
http.user_agent user_agent.original
net.peer.name server.address

Test plan

  • OTel tracing CI tests pass with updated scenario files
  • No regressions in other tracing-related tests

Generated with Claude Code

Go 1.25 + otelhttp v0.60.0 uses new OpenTelemetry semantic convention
attribute names (e.g., http.response.body.size instead of http.wrote_bytes,
http.response.status_code instead of http.status_code, http.request.method
instead of http.method, url.full instead of http.url, url.scheme instead of
http.scheme, user_agent.original instead of http.user_agent, server.address
instead of net.peer.name). Backport scenario updates from master.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@buger buger requested a review from a team as a code owner April 16, 2026 14:54
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 16, 2026

This pull request updates 16 OpenTelemetry (OTel) tracing test scenarios to align with new semantic conventions introduced by Go 1.25 and the otelhttp v0.60.0 library. The changes are a backport from the master branch to resolve CI failures on the release-5.12 branch.

The modifications consist of renaming OTel attribute keys in the YAML test files. For example, http.status_code is changed to http.response.status_code, and http.url is updated to url.full.

Files Changed Analysis

  • Changed Files: 16 YAML files located in ci/tests/tracing/scenarios/.
  • Additions/Deletions: Each file has an equal number of additions and deletions, reflecting the direct replacement of old attribute names with new ones.
  • Notable Patterns: The changes are a consistent find-and-replace operation across all affected files, applying the attribute mapping provided in the PR description.

Architecture & Impact Assessment

  • What this PR accomplishes: It fixes failing OTel tracing tests in the CI pipeline for the release-5.12 branch. The tests were failing because the underlying OTel instrumentation library, when compiled with Go 1.25, now emits attributes according to updated semantic conventions.
  • Key technical changes introduced: The PR modifies test assertions by updating the expected OTel attribute names. No production code is altered.
  • Affected system components: The primary impact is on the CI test suite for OpenTelemetry tracing. There is no direct impact on the Tyk gateway's runtime behavior or architecture, as this change only aligns the tests with existing instrumentation behavior.

Scope Discovery & Context Expansion

  • The changes are confined to the test scenarios, indicating that the actual instrumentation code within the gateway likely already produces these new attributes, a change inherited from the otelhttp dependency. This PR brings the test expectations in line with the new reality.
  • To fully understand the context, a reviewer could examine the Go files responsible for OTel instrumentation to see where the otelhttp library is used and how these trace attributes are generated. This would confirm that the test changes accurately reflect the behavior of the instrumented production code.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: bug

Powered by Visor from Probelabs

Last updated: 2026-04-16T14:56:25.015Z | Triggered by: pr_opened | Commit: 9fbc959

💡 TIP: You can chat with Visor using /visor ask <your question>

@github-actions
Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 9fbc959
Failed at: 2026-04-16 14:55:46 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: branch name 'fix/otel-scenario-attributes-5.12' must contain a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 16, 2026

✅ Security Check Passed

No security issues found – changes LGTM.

✅ Security Check Passed

No security issues found – changes LGTM.

\n\n

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Performance Check Passed

No performance issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2026-04-16T14:56:11.983Z | Triggered by: pr_opened | Commit: 9fbc959

💡 TIP: You can chat with Visor using /visor ask <your question>

@github-actions
Copy link
Copy Markdown
Contributor

API Changes

no api changes detected

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@buger buger merged commit 331dcbe into release-5.12 Apr 16, 2026
44 of 55 checks passed
@buger buger deleted the fix/otel-scenario-attributes-5.12 branch April 16, 2026 15:26
buger added a commit that referenced this pull request Apr 16, 2026
Reverts the OTel test scenario changes from PR #8041. The release-5.12
branch uses otelhttp v0.49.0 which emits OLD semantic convention
attribute names (http.method, http.status_code, etc.). The scenarios
were incorrectly updated to expect NEW names (http.request.method,
http.response.status_code, etc.) which the gateway does not emit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
buger added a commit that referenced this pull request Apr 16, 2026
## Summary
Reverts PR #8041 which incorrectly updated OTel test scenarios to use
NEW attribute names on release-5.12.

release-5.12 uses otelhttp v0.49.0 (pinned via go.mod replace), which
emits OLD names:
- `http.method` (not `http.request.method`)
- `http.status_code` (not `http.response.status_code`)
- `http.user_agent` (not `user_agent.original`)
- `http.wrote_bytes` (not `http.response.body.size`)

The scenario update was only correct for master (otelhttp v0.65.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@buger buger changed the title fix: update OTel tracing test scenarios for Go 1.25 [TT-16342] fix: update OTel tracing test scenarios for Go 1.25 Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant