dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

Add service tag to health metrics

Open marcotc opened this issue 2 years ago • 0 comments

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.

marcotc avatar Jul 13 '22 23:07 marcotc