Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

DogStatsD protocol >= v1.2 support #1066

@chollinger93

Description

@chollinger93

Issue

It appears that stripe/veneur:latest doesn't support DogStatsD protocol v.1.2

Repro

# pip3 install datadog==0.49.1
# unset DD_ORIGIN_DETECTION_ENABLED # <= default
from datadog.dogstatsd.base import DogStatsd
client: DogStatsd = DogStatsd(host=host, port=port)
client.open_buffer()
client.gauge("test", value=1, tags=["env:dev"])
client.flush()

Or

// go get github.com/DataDog/datadog-go/v5/statsd

import (
        "github.com/DataDog/datadog-go/v5/statsd"
)

func main() {
	client, err := statsd.New("host:port")
	if err != nil {
		panic(err)
	}
        err = client.Count("test", 1, []string{"env:dev"}, 1)
	if err != nil {
		panic(err)
	}
	client.Flush()
}

Will produce a package like

test:1|g|#env:dev|c:2688d562f64906640e73a13ef6bf784310d9498072d4d19360c459192942f190

Which veneur will not process

ime="2024-05-29T20:25:34Z" level=debug msg="Could not parse packet" error="Invalid metric packet, contains unknown section \"c:2688d562f64906640e73a13ef6bf784310d9498072d4d19360c459192942f190\"" packet="test:1|g|#env:dev|c:2688d562f64906640e73a13ef6bf784310d9498072d4d19360c459192942f190"

Versions <= 0.44.1 (Python) and != github.com/DataDog/datadog-go/v5/statsd in go produce a simpler payload:

test:1|g|#env:dev

Which works like expected.

Explicitly setting DD_ORIGIN_DETECTION_ENABLED=false seems to work too.

Not sure if this is expected or if there's a setting for this. If not, it would be great to have

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