-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support Datadog distributions metric in Datadog formatter #25
Support Datadog distributions metric in Datadog formatter #25
Conversation
|
2bd6601
to
3c93490
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 so much @hkrutzer! I really appreciate this contribution 😊
defp format_metric_value(%Metrics.Summary{}, value), | ||
do: [format_number(value), "|ms"] | ||
defp format_metric_value( | ||
%Metrics.Summary{reporter_options: reporter_options}, |
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.
@hkrutzer how about we make Distribution
reportable in Datadog format?
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.
The types of telemetry_metrics vs statsd metrics is a bit confusing, but the telemetry_metrics type requires a buckets
option right? That doesn't make much sense here.. But the name would make a lot more sense.
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.
Yes, that doesn't make much sense. I'll bring that up in Telemetry.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.
@@ -65,6 +65,8 @@ children = [ | |||
Supervisor.start_link(children, ...) | |||
``` | |||
|
|||
To use [Datadog's distributions metric type](https://docs.datadoghq.com/metrics/distributions/), add `formatter_options: [report_as: :distribution]` to your metric. |
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.
Would you mind moving this line to the section describing the Distribution metric?
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.
What section do you mean?
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.
Somewhere below here 👍
telemetry_metrics_statsd/lib/telemetry_metrics_statsd.ex
Lines 161 to 162 in e355ef7
Since histograms are configured on the StatsD server side, the `:buckets` option has no effect | |
when used with this reporter. |
%Metrics.Summary{reporter_options: reporter_options}, | ||
value | ||
) do | ||
case Keyword.get(reporter_options, :report_as) do |
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 agree it would be nice to have a datadog
mentioned somewhere in the option name or value. I'll try to come up with something.
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.
Let's just go with report_as: :datadog_distribution
.
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.
Done!
3c93490
to
a8815b6
Compare
@hkrutzer could you rebase on master so that CI runs on latest supported versions? |
a8815b6
to
02713ec
Compare
02713ec
to
8bcbd5d
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!
Resolves #22