-
Notifications
You must be signed in to change notification settings - Fork 422
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
Initial integration of DogStatsD #585
base: main
Are you sure you want to change the base?
Conversation
including something called mogrifiers Signed-off-by: JDeuce <jjaques@gmail.com>
Signed-off-by: JDeuce <jjaques@gmail.com>
Signed-off-by: JDeuce <jjaques@gmail.com>
Signed-off-by: JDeuce <jjaques@gmail.com>
I apologize for making a design comment on an already implemented PR but what if instead of continuing to build support for specific company / vendor formats we instead implemented vendor-neutral OTEL Metrics ? |
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.
Small comment otherwise LGTM.
} else if s.UseDogStatsd { | ||
var err error | ||
sink, err := godogstats.NewSink( | ||
godogstats.WithStatsdHost(s.StatsdHost), | ||
godogstats.WithStatsdPort(s.StatsdPort), | ||
godogstats.WithMogrifierFromEnv(s.UseDogStatsdMogrifiers)) | ||
if err != nil { | ||
logger.Fatalf("Failed to create statsd sink: %v", err) | ||
} | ||
logger.Info("Stats initialized for dogstatsd") | ||
store = gostats.NewStore(sink, false) | ||
} else if s.UseStatsd { |
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.
Can you make it an error if someone sets both dogstatsd and statsd to true?
godogstats
package is implemented to bridgelyft/gostats
with dogstatsd.There is a new statsd sink implemented which will output the stats using dogstatsd protocl over UDP which allows tags.
Thus, a new
mogrification
feature is also added which lets us mogrify the stat from internal metric names, into a different name + tags, similar to what is done in the prom-stats-exporter exampleNote: there is some runtime cost associated with mogrifying the metrics but it should be minimal due to the existing in memory flushing architecture.