dd-trace-rb
dd-trace-rb copied to clipboard
[APPSEC-11887] Add Telemetry metric support
What does this PR do?
Adds support for telemetry metrics.
Telemetrics metrics is enabled by default and can be configured using c.telemetry.metrics = <bool>
or using DD_TELEMETRY_METRICS_ENABLED
Each product will be able to send metrics using a straightforward API.
telemetry_client.add_<metric_type>_metric(namespace ["tracers", "general", "telemetry", "iast", "appsec"], metric_key String, value Numeric, tags Hash)
The metrics will be flushed at the interval configured for telemetry. I decided to reuse the same interval as telemetry to avoid having too many configurations for telemetry, also the RFC did not specify anything about this particular option.
Motivation:
Additional Notes:
How to test the change?
For Datadog employees:
- [ ] If this PR touches code that signs or publishes builds or packages, or handles
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance
. - [ ] This PR doesn't touch any of that.
Unsure? Have a question? Request a review!