Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DogStatsD protocol >= v1.2 support #1066

Open
chollinger93 opened this issue May 29, 2024 · 0 comments
Open

DogStatsD protocol >= v1.2 support #1066

chollinger93 opened this issue May 29, 2024 · 0 comments

Comments

@chollinger93
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant