From 978d1938fa63dd7166ba17a831d9548e2726154d Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Fri, 11 Nov 2022 01:21:30 +0100 Subject: [PATCH] Remove setting `HTTP_ROUTE` attribute in frontend (#566) As per the OpenTelemetry HTTP Server semantic conventions, `HTTP.ROUTE` is meant to be a low cardinality route template. The URI cannot substitute it. This patch remove the usage of the HTTP_ROUTE semantic attribute. --- docs/services/frontend.md | 1 - src/frontend/utils/telemetry/InstrumentationMiddleware.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/services/frontend.md b/docs/services/frontend.md index 09321c6a2d..5dcca34b67 100644 --- a/docs/services/frontend.md +++ b/docs/services/frontend.md @@ -75,7 +75,6 @@ application context. "app.synthetic_request": true, [SemanticAttributes.HTTP_TARGET]: target, [SemanticAttributes.HTTP_STATUS_CODE]: response.statusCode, - [SemanticAttributes.HTTP_ROUTE]: url, [SemanticAttributes.HTTP_METHOD]: method, [SemanticAttributes.HTTP_USER_AGENT]: headers['user-agent'] || '', [SemanticAttributes.HTTP_URL]: `${headers.host}${url}`, diff --git a/src/frontend/utils/telemetry/InstrumentationMiddleware.ts b/src/frontend/utils/telemetry/InstrumentationMiddleware.ts index 9fdec51d29..88f040ea53 100644 --- a/src/frontend/utils/telemetry/InstrumentationMiddleware.ts +++ b/src/frontend/utils/telemetry/InstrumentationMiddleware.ts @@ -22,7 +22,6 @@ const InstrumentationMiddleware = (handler: NextApiHandler): NextApiHandler => { "app.synthetic_request": true, [SemanticAttributes.HTTP_TARGET]: target, [SemanticAttributes.HTTP_STATUS_CODE]: response.statusCode, - [SemanticAttributes.HTTP_ROUTE]: url, [SemanticAttributes.HTTP_METHOD]: method, [SemanticAttributes.HTTP_USER_AGENT]: headers['user-agent'] || '', [SemanticAttributes.HTTP_URL]: `${headers.host}${url}`,