DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
488 stars 152 forks source link

[Feature] Add tag to trace.lumen.request.hits #1596

Open simivar opened 2 years ago

simivar commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, in our Datadog metrics, we can see trace.lumen.request.hits. We are using it on several dashboards. Because we are using a modular monolith we have a dashboard per component and we used to exclude resources based on the resource name but it became complicated with a high number of routes. We would like to add the application level tag to a metric so we can exclude routes based on that tag. Is that possible?

Describe the solution you'd like We want to have a custom tag set from application-level added to trace.lumen.request.hits metric

Describe alternatives you've considered Duplicating a metric and sending it on our own with a proper tag

Additional context I've tried using \DDTrace\add_global_tag() but unfortunately it didn't work

amne commented 4 weeks ago

According to DD documentation it is currently not possible to add custom tags to trace metrics (the 100% sampled ones)[1]

image

[1] https://docs.datadoghq.com/tracing/metrics/metrics_namespace/#overview