metrics_tags = { namespace: namespace, task_queue: task_queue }.freeze
Temporal.metrics.timing(
Temporal::MetricKeys::ACTIVITY_POLLER_TIME_SINCE_LAST_POLL,
time_diff_ms,
metrics_tags
)
# timing definition
def timing(key, time, tags = {})
adapter.timing(key, time, tags)
end
This is not compatible with statsd, which expects the tags to be nested inside tags
That means applications can't just use statsd implementation, one like https://github.com/DataDog/dogstatsd-ruby. They need to implement their own adapter that builds the tags before passing to the underlying client.
approach
This PR adds an adapter that is compatible with statsd, so that applications can use that instead of writing their own.
problem
Temporal.metrics
is sending tags as a plain hashThis is not compatible with statsd, which expects the tags to be nested inside
tags
That means applications can't just use statsd implementation, one like https://github.com/DataDog/dogstatsd-ruby. They need to implement their own adapter that builds the tags before passing to the underlying client.approach
This PR adds an adapter that is compatible with statsd, so that applications can use that instead of writing their own.