Shopify / statsd-instrument

A StatsD client for Ruby apps. Provides metaprogramming methods to inject StatsD instrumentation into your code.
http://shopify.github.io/statsd-instrument
MIT License
570 stars 94 forks source link

Datadog Origin Detection support? #321

Closed cwoodcox closed 8 months ago

cwoodcox commented 1 year ago

Datadog Origin Detection allows stats emitted by Workloads in Kubernetes clusters to be identified by the Datadog Agent running in the cluster. That way, the tags from that Workload specified by Datadog Autodiscovery can be added before shipping them to Datadog.

This is usually accomplished by adding a tag (dd.internal.entity_id) to all datagrams emitted, and the value of that tag is the Pod UID (usually provided via DD_ENTITY_ID ENV var).

The other option is support for Unix Domain Sockets, where Origin Detection happens automatically.

Any chance this library supports that in the future?

casperisfine commented 1 year ago

I suppose you can already do this since there is already a "default tags" support.

Automatically adding DD_ENTITY_ID in the default tags would be easy, feel free to submit a PR. But would be nice to link to some documentation.

kleinkk76 commented 8 months ago

Datadog Origin Detection allows stats emitted by Workloads in Kubernetes clusters to be identified by the Datadog Agent running in the cluster. That way, the tags from that Workload specified by Datadog Autodiscovery can be added before shipping them to Datadog.

This is usually accomplished by adding a tag (dd.internal.entity_id) to all datagrams emitted, and the value of that tag is the Pod UID (usually provided via DD_ENTITY_ID ENV var).

The other option is support for Unix Domain Sockets, where Origin Detection happens automatically.

Any chance this library supports that in the future?

https://github.com/Shopify/statsd-instrument/issues/321#issue-1422952645

kleinkk76 commented 8 months ago

Datadog Origin Detection allows stats emitted by Workloads in Kubernetes clusters to be identified by the Datadog Agent running in the cluster. That way, the tags from that Workload specified by Datadog Autodiscovery can be added before shipping them to Datadog.

This is usually accomplished by adding a tag (dd.internal.entity_id) to all datagrams emitted, and the value of that tag is the Pod UID (usually provided via DD_ENTITY_ID ENV var).

The other option is support for Unix Domain Sockets, where Origin Detection happens automatically.

Any chance this library supports that in the future?

https://github.com/Shopify/statsd-instrument/issues/321#issue-1422952645

Datadog Origin Detection allows stats emitted by Workloads in Kubernetes clusters to be identified by the Datadog Agent running in the cluster. That way, the tags from that Workload specified by Datadog Autodiscovery can be added before shipping them to Datadog. This is usually accomplished by adding a tag (dd.internal.entity_id) to all datagrams emitted, and the value of that tag is the Pod UID (usually provided via DD_ENTITY_ID ENV var). The other option is support for Unix Domain Sockets, where Origin Detection happens automatically. Any chance this library supports that in the future?

#321 (comment)

https://github.com/Shopify/statsd-instrument/issues/321#issuecomment-1872996514

casperisfine commented 8 months ago

Closing this as we're not likely to implement it ourselves, but PR welcome.

kleinkk76 commented 8 months ago

I suppose you can already do this since there is already a "default tags" support.

Automatically adding DD_ENTITY_ID in the default tags would be easy, feel free to submit a PR. But would be nice to link to some documentation.

kleinkk76 commented 8 months ago

https://github.com/Shopify/statsd-instrument/issues/321#issuecomment-1296873020 M