feat(otel): add TracingResponseFilter for error status codes#8098
feat(otel): add TracingResponseFilter for error status codes#8098paoloantinori wants to merge 37 commits into
Conversation
Add a ContainerResponseFilter that records HTTP response status codes on OpenTelemetry spans and marks 5xx server errors with ERROR status. - Sets http.response.status_code attribute (OTel semconv standard) - 5xx responses: span status set to ERROR with "HTTP <code>" description - 4xx/3xx/2xx: status code recorded but span status left as UNSET - 6 unit tests covering 200, 301, 404, 500, 503, and no-active-span Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
PR auto-accepted (trusted author). Full test suite will run. A maintainer can use |
|
The test suite was cancelled for commit eb063c2. See the workflow run. Use |
|
Verify — ✅ passed (run)
Change detectionjava: |
|
@carlesarnal gentle ping — this PR is ready for review whenever you have a moment. CI is green and all checks pass. |
|
The test suite failed for commit 5da1f3b. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit e00f425. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit 097b370. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit 4eb38c1. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit 5873a9d. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit 5dde5f1. @paoloantinori, please check the workflow run and push a fix. |
Signed-off-by: Paolo Antinori <pantinor@redhat.com>
|
The test suite failed for commit 1282406. @paoloantinori, please check the workflow run and push a fix. |
|



Summary
Adds a
ContainerResponseFilterthat records HTTP response status codes on OpenTelemetry spans and marks server errors (5xx) with ERROR status (GitHub Issue #7150, item 6).http.response.status_codeattribute (OTel semantic convention, long type)ERRORwith generic"HTTP <code>"description (no internal details leaked)UNSET(per OTel spec, 4xx is a client error, not a server error)ATTR_HTTP_RESPONSE_STATUS_CODEconstant toOTelAttributesRelated Issues
Changes
TracingResponseFilter.java@Providerresponse filterOTelAttributes.javaATTR_HTTP_RESPONSE_STATUS_CODETracingResponseFilterTest.javaTest plan