DataDog / java-dogstatsd-client

Java statsd client library
MIT License
176 stars 101 forks source link

Origin Detection: Send both container ID and entity ID #241

Closed gh123man closed 5 months ago

gh123man commented 6 months ago

We would like customers to be able to retrieve container tags even when DD_ENTITY_ID is set. The current behavior does not send the container-id if the entity id is set.

This PR implements the same changes seen in these PRs: https://github.com/DataDog/datadog-go/pull/300 https://github.com/DataDog/datadogpy/pull/828

Background

UDP support for origin detection was first introduced in 7.51 However it was difficult to use due to the combination of settings required. With 7.54+ you can enable DD_ORIGIN_DETECTION_UNIFIED and it will "just work".

After this change with DD_ORIGIN_DETECTION_UNIFIED users can control origin tags by simply changing the cardinality setting (to high for container level tags). This PR ultimately helps conform to the new origin detection architecture in the agent: Clients should send "Everything" (all data needed for origin detection), the agent should ingest everything, and cardinality controls which tags actually get sent.

The old behavior is maintained by omitting the DD_ORIGIN_DETECTION_UNIFIED in the agent which will cause the tagger to fall back to legacy mode. This will eventually be removed.

gh123man commented 5 months ago
image

Tested and confirmed with agent 7.54.0