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

Handle Histograms in Datadog Exporter #1583

Conversation

hanyuancheung
Copy link
Member

Follow: #1554
This is part of the #1478 todo list:

  • Remove the MinMaxSumCount from cortex.
  • Remove Point aggregations from datadog exporter.
  • Handle Histograms in the datadog exporter
  • Remove Point aggregations from dogstatsd exporter.
  • Handle Histograms in the dogstatsd exporter

@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #1583 (cfcef9b) into main (e3db96c) will increase coverage by 0.0%.
The diff coverage is 0.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #1583   +/-   ##
=====================================
  Coverage   69.3%   69.4%           
=====================================
  Files        127     127           
  Lines       5432    5427    -5     
=====================================
  Hits        3768    3768           
+ Misses      1521    1516    -5     
  Partials     143     143           
Impacted Files Coverage Δ
exporters/metric/datadog/datadog.go 50.7% <0.0%> (+3.3%) ⬆️

@hanyuancheung
Copy link
Member Author

PTAL, when Codecov scans, it warns there are several lines not covered. It bothers me how I could fix it, thanks for the help.

@@ -109,19 +109,13 @@ func (e *Exporter) Export(ctx context.Context, res *resource.Resource, ilr expor
tags = append(tags, tag)
}
switch agg := agg.(type) {
case aggregation.Points:
numbers, err := agg.Points()
case aggregation.Histogram:
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to correctly handle Histograms for DD exporters, we need a way to change the Aggregator used to restore the former exact support. This is possible, however we do see a lot of change about to happen in the Metrics SDK and I'm concerned it will be a waste of your time.

In the longer term, an OTel user might want to install a more direct shim to the DD library by implementing the metrics API directly -- that is also about to change. However, if you did that, you'd lose the Views facility that is under development for the default SDK, and I would recommend DataDog to accept OTLP at its agent instead. 😁

If you did bring back the Exact aggregator, I might suggest calculating Summaries instead. You could look at how it's handled in the OTC Statsd receiver: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/statsdreceiver/protocol/metric_translator.go#L70
Then, you'd have all the DD client's functionality except for its handling of histograms, which would appear as quantiles over short intervals, which roughly approximates DD's old handling of histograms (pre-Dogsketch).

@MrAlias
Copy link
Contributor

MrAlias commented Feb 17, 2022

With the deprecation of the datadog exporter and removal of histogram support in #1846 I think we can close this. The project direction is to remove this exporter in a future release so I don't think we should spend effort here trying to add back this functionality.

@hanyuancheung
Copy link
Member Author

With the deprecation of the datadog exporter and removal of histogram support in #1846 I think we can close this. The project direction is to remove this exporter in a future release so I don't think we should spend effort here trying to add back this functionality.

Get it, I’ll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants