[instrumentation-http] add hook for custom server and client metrics attributes #5135
Open
1 of 5 tasks
Labels
blocked
Currently blocked on another item
pkg:instrumentation-http
type:feature
A feature with no sub-issues to address
Description
Warning
The two issues linked below (#4095, #4096) are REQUIRED to be finished before implementation of this feature can start. Any PR opened to add this hook before these are finished will be rejected.
Feature request: #5051
Goal of this issue is implementing two additional hooks for adding metric attributes for both client and server metrics in the
@opentelemetry/instrumentation-http
package. Adding this feature was requested multiple times to increase the usefulness ofhttp.request.server.duration
andhttp.request.client.duration
metrics. For both of these metrics, it can make sense to attach additional attribute (such ashttp.route
) so that users can split the metric later onWhile discussing #5051 we've identified that we currently have a few blockers before we can implement this feature in a safe manner. With the current state of the SDK, misuse of such a hook can cause the end-user's application to crash.
Therefore, the following features/bugfixes need to be implemented before this feature is unblocked:
This issue is considered done when
HttpInstrumentation
which receive theRequestOptions
and returns these attributes to the metricREADME.md
Additional context
Attachment 1 (possible interface, apply own judgement when implementing)
The text was updated successfully, but these errors were encountered: