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

Support Datadog distributions metric in Datadog formatter #25

Merged
merged 1 commit into from
May 12, 2020

Conversation

hkrutzer
Copy link
Contributor

Resolves #22

@hkrutzer
Copy link
Contributor Author

:distribution or :report_as could perhaps be renamed to have the word Datadog in it.

@hkrutzer hkrutzer force-pushed the datadog-distributions-metric branch from 2bd6601 to 3c93490 Compare January 26, 2020 18:25
Copy link
Collaborator

@arkgil arkgil left a 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},
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere below here 👍

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
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@hkrutzer hkrutzer force-pushed the datadog-distributions-metric branch from 3c93490 to a8815b6 Compare February 12, 2020 09:04
@hkrutzer hkrutzer marked this pull request as ready for review February 12, 2020 09:04
@arkgil
Copy link
Collaborator

arkgil commented Feb 13, 2020

@hkrutzer could you rebase on master so that CI runs on latest supported versions?

@hkrutzer hkrutzer force-pushed the datadog-distributions-metric branch from a8815b6 to 02713ec Compare February 13, 2020 23:01
Copy link
Collaborator

@arkgil arkgil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@arkgil arkgil merged commit e0f68bf into beam-telemetry:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Datadog distribution metric support
2 participants