dd-trace-rb
dd-trace-rb copied to clipboard
Add service tag to health metrics
Currently health metrics are sent without a service
tag, with only the env
tag.
This means that all services in the same env
will get their health metrics merged together. This makes these metrics not useful.
This PR adds the service
tag, collected from c.service
, to all statsd metrics generated for health metrics.
No service name being set (c.service == nil
) is still supported (metrics will be send successfully without a service
), but not very useful in practice.
For Runtime Metrics, this currently works because runtime metrics collect service names from spans being flushed, thus populating an internal list of services.