feat(telemetry): implement app-extended-heartbeat event#301
feat(telemetry): implement app-extended-heartbeat event#301khanayan123 merged 17 commits intomainfrom
Conversation
Add support for the app-extended-heartbeat telemetry event per the telemetry v2 API spec. The event fires periodically (default 24h) and includes the full configuration payload, matching app-started. The interval is configurable via DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL (integer seconds) to enable system testing with shorter intervals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BenchmarksBenchmark execution time: 2026-03-31 05:04:20 Comparing candidate commit 6766649 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 0 metrics, 0 unstable metrics.
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eartbeat default Move extended heartbeat scheduling after metrics to preserve the positional task order expected by FakeEventScheduler in tests (heartbeat=0, metrics=1). Add default value check for extended_heartbeat_interval in test_configuration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The FakeEventScheduler used positional indexing to identify callbacks, which broke when the extended heartbeat task was added. Use interval duration to distinguish metrics (<=60s) from extended heartbeat (>60s) callbacks instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🎯 Code Coverage (details) 🔗 Commit SHA: c888b84 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
…load Add test that creates a telemetry instance with configuration, triggers the extended heartbeat, and verifies the payload contains the expected configuration entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…anges Add a test that simulates a remote config override after startup and confirms the extended heartbeat reports the updated value and origin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deduplicate the origin switch + error serialization logic shared by generate_configuration_field and extended_heartbeat_payload into a pure serialize_configuration_field(metadata, seq_id) helper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL type from INT to DECIMAL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anna-git
left a comment
There was a problem hiding this comment.
thanks for adressing comments, nice work!
…erval Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…heartbeat interval Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Implement the `app-extended-heartbeat` telemetry event for the C++ tracer, scoped to the `configuration` payload only.
Motivation
Long-running services (24h+) currently only report their configuration state via the initial `app-started` event. If the backend misses or loses that event, there's no way to recover visibility into the SDK's configuration. The `app-extended-heartbeat` event solves this by re-sending the full configuration payload every 24h, ensuring reliable state reporting for long-running instances.
Per the spec, `integrations` and `dependencies` are optional — this PR scopes to `configuration` only, which is the focus of Config Visibility reliability.
Implementation
Changes
Related