[DRAFT] NOT MERGING POC:: Send Go runtime metrics via OTLP using OTel-native naming#4611
[DRAFT] NOT MERGING POC:: Send Go runtime metrics via OTLP using OTel-native naming#4611
Conversation
Adds go.memory.used, go.memory.limit, go.memory.allocated, go.memory.allocations, go.memory.gc.goal, go.goroutine.count, go.processor.limit, go.config.gogc as OTel instruments on the existing OTLP metrics pipeline. Enabled with DD_RUNTIME_METRICS_ENABLED=true + DD_METRICS_OTEL_ENABLED=true. Falls back to DogStatsD if OTLP init fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| return | ||
| } | ||
| if err := ddmetric.Shutdown(context.Background(), o.provider); err != nil { | ||
| log.Error("Error shutting down OTLP runtime metrics: %v", err) |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
ruleguard: suggestion: log.Error("Error shutting down OTLP runtime metrics: %v", err.Error()) (gocritic)
| log.Debug("Runtime metrics enabled via OTLP with OTel-native naming.") | ||
| orm, err := startOTLPRuntimeMetrics() | ||
| if err != nil { | ||
| log.Error("Failed to start OTLP runtime metrics, falling back to DogStatsD: %v", err) |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
ruleguard: suggestion: log.Error("Failed to start OTLP runtime metrics, falling back to DogStatsD: %v", err.Error()) (gocritic)
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: a903e74 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-04-09 17:22:41 Comparing candidate commit a903e74 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 215 metrics, 7 unstable metrics.
|
Verifies all 8 OTel Go semantic convention names are expected and none accidentally use DD-proprietary naming. Mirrors the TestReportRuntimeMetrics pattern for DogStatsD metrics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses ManualReader + real instruments + callbacks to verify all 8 go.* metrics produce positive values with correct tags. Mirrors TestReportRuntimeMetrics pattern for DogStatsD. 3/3 runs, no flakes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New scenario OTLP_RUNTIME_METRICS that sets DD_METRICS_OTEL_ENABLED=true alongside DD_RUNTIME_METRICS_ENABLED=true. Tests verify OTel-native metric names (dotnet.*, jvm.*, go.*, v8js.*) appear in OTLP payloads and that DD-proprietary names (runtime.dotnet.*, runtime.go.*) do not. All languages marked as missing_feature in manifests until POC PRs are merged: - .NET: DataDog/dd-trace-dotnet#8299 - Go: DataDog/dd-trace-go#4611 - Node.js: DataDog/dd-trace-js#7869 - Java: DataDog/dd-trace-java#10985 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sends go.memory.*, go.goroutine.count, go.processor.limit, go.config.gogc via OTLP. Related: DataDog/dd-trace-dotnet#8299
🤖 Generated with Claude Code