-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[datadogexporter] Implement translation of metrics to Datadog format #1178
[datadogexporter] Implement translation of metrics to Datadog format #1178
Conversation
This will be expanded in the future to more closely replicate the Datadog Agent behavior
Codecov Report
@@ Coverage Diff @@
## master #1178 +/- ##
===========================================
+ Coverage 76.01% 89.79% +13.78%
===========================================
Files 24 285 +261
Lines 1163 13873 +12710
===========================================
+ Hits 884 12457 +11573
- Misses 226 1047 +821
- Partials 53 369 +316
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
We can add it back if necessary in the future
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.
Approving on behalf of Datadog.
Please rebase |
@bogdandrutu Done! |
#1178) OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command separated list of attributes names that will be extracted from Tornado's request object and set as attributes on spans. Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
#1178) OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command separated list of attributes names that will be extracted from Tornado's request object and set as attributes on spans. Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
#1178) OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command separated list of attributes names that will be extracted from Tornado's request object and set as attributes on spans. Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
#1178) OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command separated list of attributes names that will be extracted from Tornado's request object and set as attributes on spans. Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
#1178) OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command separated list of attributes names that will be extracted from Tornado's request object and set as attributes on spans. Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
Description: Add utilities to translate
pdata.Metrics
into Datadog metrics and obtain a valid hostname.For the metrics translation we are not relying on OpenCensus helpers as other exporters do based on this Gitter thread. This implies some testing limitations (see Testing section).
The hostname resolution is currently very simple but will be expanded in future PRs.
Link to tracking Issue: n/a
Testing:
I added unit tests to test mapping every metric type; the
MapMetrics
function can't be tested easily since constructing apdata.Metrics
struct relies on internalopentelemetry-collector
packages that can't be imported from theopentelemetry-collector-contrib
modules.I also added a unit test for the hostname resolution.
Documentation: Configuration options and the intended exporter behavior were documented on #1142; this PR adds documentation on each function.