Skip to content

DogStatsD v1.2 Container ID support #640

@marc-harrison

Description

@marc-harrison

It appears that statsd_exporter may not support DogStatsD v1.2 https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics#dogstatsd-protocol-v12

Specifically, the container ID prefix |c:<CONTAINER_ID>. Here's example from debug logging:

level=debug ts=2025-07-08T18:34:11.692Z caller=listener.go:73 msg="Incoming line" proto=udp line=datadog.dogstatsd.client.metrics_by_type:0|c|#service:abc,client:go,client_version:5.4.0,client_transport:udp,metrics_type:count|c:3a88c225dbeb98f20bbb40cbd39ef90b094ce74291ae66fbd98b7f06f2a15b86

level=debug ts=2025-07-08T18:34:11.692Z caller=line.go:295 msg="Invalid sampling factor or tag section" component=#service:abc,client:go,client_version:5.4.0,client_transport:udp,metrics_type:count line=datadog.dogstatsd.client.metrics_by_type:0|c|#service:abc,client:go,client_version:5.4.0,client_transport:udp,metrics_type:count|c:3a88c225dbeb98f20bbb40cbd39ef90b094ce74291ae66fbd98b7f06f2a15b86

Happy to take a crack at this if needed. It looks like adding a switch to https://github.com/prometheus/statsd_exporter/blob/master/pkg/line/line.go#L321 might be the way to handle this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions