server.address attribute for http.server.request.duration #14244
Replies: 2 comments
-
As of now I don't think this is implemented at all (until that linked PR is merged). I interpreted @trask's comments to indicate that the author of the PR needed to put those attributes behind a configuration flag to allow users to opt-in. Because as it is implemented in that PR currently, it would be enabled by default, and implementing a custom view would be the only way to opt-out. I may be mis-interpreting though |
Beta Was this translation helpful? Give feedback.
-
I believe it is not correct. If you don't specify the name the metric will retain its original name. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
From https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration I understand that the
server.address
attribute of thehttp.server.request.duration
metric is opt-in, with reasons described in https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/#http-server-duration-metric. What I could not find is documentation on a convenient way to enable the attribute.From https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13697/files#r2042914893 I understand that the intention is to create a view on the
http.server.request.duration
instrument that includes this attribute, but from https://github.com/open-telemetry/opentelemetry-java/tree/ce1e26f5791b9c3d5b4d8687c9a940f1ab1a4df7/sdk-extensions/incubator#view-file-configuration it appears that this would be rather involved, requiring to specify several non-obvious settings, and that the result would have to be a 2nd metric next tohttp.server.request.duration
-- i.e. I could not just add the attribute to the existing metric. Is that correct? Is there a more straight-forward / convenient way to add theserver.address
attribute to the existinghttp.server.request.duration
metric?Beta Was this translation helpful? Give feedback.
All reactions