-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Statsd datadog #5791
Statsd datadog #5791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me! I have a bunch of minor points.
plugins/inputs/statsd/datadog.go
Outdated
if rawMetadataFields[i][0] == '#' { | ||
parseDataDogTags(m.tags, rawMetadataFields[i][1:]) | ||
} else { | ||
log.Printf("W! [inputs.statsd] unknown metadata type: '%s'", rawMetadataFields[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the message is malformed an error should be returned up from here and then logged. Doing a best effort parse doesn't make sense unless we find that the datadog agent regularly emits bad messages.
plugins/inputs/statsd/datadog.go
Outdated
if message[i] == ',' { | ||
if k == "" { | ||
k = message[start:i] | ||
tags[k] = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is allowed to have an empty tag value in InfluxDB, we just toss them at serialize time.
closes #5224
This adds Datadog events to the Statsd input plugin.