Skip to content

[TT-16342] fix: update OTel test scenarios to match Go 1.25 attribute names#8059

Closed
buger wants to merge 1 commit intorelease-5.12.1from
fix/otel-scenarios-5.12.1
Closed

[TT-16342] fix: update OTel test scenarios to match Go 1.25 attribute names#8059
buger wants to merge 1 commit intorelease-5.12.1from
fix/otel-scenarios-5.12.1

Conversation

@buger
Copy link
Copy Markdown
Member

@buger buger commented Apr 16, 2026

Summary

Key attribute mappings (old -> new)

Old New
http.method http.request.method
http.status_code http.response.status_code
http.wrote_bytes http.response.body.size
http.user_agent user_agent.original
http.url url.full
http.scheme url.scheme
net.peer.name server.address

Test plan

  • OTel e2e tracing tests pass on release-5.12.1 CI with Go 1.25
  • Scenario files match the attribute names emitted by the gateway

Closes incorrect revert PRs #8047 and #8048.

🤖 Generated with Claude Code

Go 1.25 updated the OTel HTTP instrumentation library which now emits
new-style semantic convention attributes. Update test scenarios to
match the actual gateway output.

Key attribute mappings:
- http.method -> http.request.method
- http.status_code -> http.response.status_code
- http.wrote_bytes -> http.response.body.size
- http.user_agent -> user_agent.original
- http.url -> url.full
- http.scheme -> url.scheme
- net.peer.name -> server.address

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 16, 2026

This PR updates 16 OpenTelemetry (OTel) end-to-end test scenarios to align with the new semantic attribute conventions introduced by the OTel HTTP instrumentation library in Go 1.25. The changes correct a recent regression on the release-5.12.1 branch where tests were expecting outdated attribute names, causing CI failures. This ensures the test suite accurately validates the tracing output from the gateway.

Files Changed Analysis

  • Files Modified: 16 YAML files within ci/tests/tracing/scenarios/.
  • Nature of Changes: The modifications consist of a consistent find-and-replace operation across all affected files, updating OTel attribute keys in test selectors and assertions.
  • Statistics: The changes are perfectly balanced with 58 additions and 58 deletions, reflecting the direct replacement of old attribute names with new ones.

Architecture & Impact Assessment

  • Accomplishment: The PR fixes the OTel end-to-end tracing tests, making them compatible with the attributes currently emitted by the gateway compiled with Go 1.25.
  • Key Technical Changes: This is purely a test configuration change. There are no alterations to the gateway's source code or runtime behavior. The key changes involve mapping old OTel attributes to their new counterparts in the test assertion files, for example:
    • http.methodhttp.request.method
    • http.status_codehttp.response.status_code
    • http.urlurl.full
    • net.peer.nameserver.address
  • Affected Components: The change exclusively impacts the CI test suite for OpenTelemetry tracing. It has no direct effect on the production code or functionality of the Tyk gateway itself.

Scope Discovery & Context Expansion

  • Broader Scope: The impact is narrowly scoped to the testing and validation layer of the OpenTelemetry integration. The PR description clarifies that this is a corrective action for the release-5.12.1 branch, bringing its test scenarios in line with the master branch and rectifying two previous incorrect PRs ([TT-16342] revert: undo incorrect OTel scenario update (PR #8041) #8047, [TT-16342] revert: undo incorrect OTel scenario update (PR #8042) #8048). This ensures release branch stability and accurate test coverage for tracing.
  • Further Exploration: While the changes are self-contained within test definitions, to fully validate the necessity of this change, one would typically inspect the OpenTelemetry instrumentation code within the gateway to confirm where these attributes are generated. A search for how http.request.method or http.response.status_code are set within the gateway's tracing middleware would confirm that the gateway is indeed producing the new attribute names.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: bug

Powered by Visor from Probelabs

Last updated: 2026-04-16T20:43:33.942Z | Triggered by: pr_opened | Commit: 405564f

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

@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-16T20:42:49.437Z | Triggered by: pr_opened | Commit: 405564f

💡 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 Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@buger buger closed this Apr 17, 2026
@buger buger changed the title fix: update OTel test scenarios to match Go 1.25 attribute names [TT-16342] fix: update OTel test scenarios to match Go 1.25 attribute names Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 405564f
Failed at: 2026-04-21 10:11:56 UTC

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

🔍 Click to view error details
failed to get Jira issue: failed to fetch Jira issue TT-16342: Issue does not exist or you do not have permission to see it.: request failed. Please analyze the request body for more details. Status code: 404

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.

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