-
Notifications
You must be signed in to change notification settings - Fork 375
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
[SDTEST-409] Telemetry metrics support #3768
Conversation
… method we need to return events directly instead of enqueuing them to the worker
058a14f
to
fd7ae93
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3768 +/- ##
========================================
Coverage 97.91% 97.91%
========================================
Files 1243 1243
Lines 74763 74894 +131
Branches 3608 3611 +3
========================================
+ Hits 73205 73336 +131
Misses 1558 1558 ☔ View full report in Codecov by Sentry. |
Co-authored-by: datadog-datadog-prod-us1[bot] <88084959+datadog-datadog-prod-us1[bot]@users.noreply.github.com>
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.
Awesome work, @anmarchenko!
…taDog/dd-trace-rb into anmarchenko/telemetry_metrics_support
What does this PR do?
This is the final PR to provide metrics support to internal library telemetry.
Notable changes include:
Telemetry::Component
now has a public API to track metrics (#inc
,#dec
,#gauge
,#rate
,#distribution
)Telemetry::Worker
andTelemetry::Component
now have shared access toMetricsManager
DD_TELEMETRY_METRICS_ENABLED
to be able to disable sending metrics separately from telemetry,DD_TELEMETRY_METRICS_AGGREGATION_INTERVAL
is internal-only setting to change interval to aggregate and send out metrics (10 seconds by default as defined by spec)Telemetry::Worker
now maintains heartbeat ticker: we aggregate metrics every 10 seconds but we send heartbeat events every 60 seconds, so it takes(heartbeat_interval / metrics_aggregation_interval)
ticks for every heartbeatWorker#perform
- this is needed to be able to flush everything on shutdownAdditional Notes:
Usage in your products:
How to test the change?
Unit tests are provided. Please tell me if we have any product that would like to use it to submit metrics.