Add a dogstatsd metric emitter #269
Add a dogstatsd metric emitter #269
Conversation
1588f54
to
9bad856
Compare
Signed-off-by: baptiste-bonnaudet <baptiste.bonnaudet@lightspeedhq.com>
9bad856
to
e3466af
Compare
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.
Thanks for submitting this! Looks good, just left a couple comments for some minor things I noticed.
metric/emitter/dogstatsd.go
Outdated
|
||
func (emitter *DogstatsdEmitter) Emit(logger lager.Logger, event metric.Event) { | ||
|
||
reg, _ := regexp.Compile("[^a-zA-Z0-9_]+") |
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.
May be better to do this outside of Emit
so it's only compiled once. You could use regexp.MustCompile
too.
Something like:
var specialChars = regexp.MustCompile(...)
func (emitter *DogstatsdEmitter) Emit(logger lager.Logger, event metric.Event) {
metric/emitter/dogstatsd.go
Outdated
} else if f, ok := event.Value.(float64); ok { | ||
value = f | ||
} else { | ||
logger.Error(fmt.Sprintf("failed-to-convert-metric-for-dogstatsd: %s", name), nil) |
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.
Rather than a format string, lager.Data
should be used here:
logger.Error("failed-to-convert-metric-for-dogstatsd", nil, lager.Data{
"metric-name": name,
})
Signed-off-by: baptiste-bonnaudet <baptiste.bonnaudet@lightspeedhq.com>
@vito, thanks for the review! I fixed the requested changes and created the PR for the documentation concourse/docs#54 |
Concourse 3.13.0 adds support for exporting metrics to Datadog (see vmware-archive/atc#269). This adds support for the new flags, and bumps the Concourse version.
Concourse 3.13.0 adds support for exporting metrics to Datadog (see vmware-archive/atc#269). This adds support for the new flags, and bumps the Concourse version. NOTE: This is a modification to helm#5650 and should be removed when that is merged. Usage of this fork will also need to be updated to match the changed key names.
Concourse 3.13.0 adds support for exporting metrics to Datadog (see vmware-archive/atc#269). This adds support for the new flags, and bumps the Concourse version.
Concourse 3.13.0 adds support for exporting metrics to Datadog (see vmware-archive/atc#269). This adds support for the new flags, and bumps the Concourse version.
Concourse 3.13.0 adds support for exporting metrics to Datadog (see vmware-archive/atc#269). This adds support for the new flags, and bumps the Concourse version. Signed-off-by: voron <av@arilot.com>
Allows direct integration with Datadog using statsd agent.
Adds new configuration flags for atc: