Skip to content

Migrate metrics export from OTel Arrow to OTLP - #35

Merged
metalmatze merged 1 commit into
mainfrom
worktree-otlp
May 6, 2026
Merged

metalmatze merged 1 commit into
mainfrom
worktree-otlp

Conversation

@metalmatze

Copy link
Copy Markdown
Member

Drops the experimental otel-arrow dependency in favor of plain OTLP/gRPC. The agent already produces pmetric.Metrics from collector pdata, which is the OTLP data model, so the swap is mostly a wire-layer change: pmetricotlp.NewExportRequestFromMetrics plus pmetricotlp.NewGRPCClient reuse the existing *grpc.ClientConn (and with it all the auth, TLS, retry, and header plumbing). NVML producers, the per-device sample buffer, and the lifecycle wiring are untouched.

One side-fix tagged on: MockProducer.Collect returned nil immediately, which made the run group shut down before the first export tick. It now blocks on ctx.Done() so the mock actually exercises the export path end to end.

Drops the experimental otel-arrow protocol and sends pmetric.Metrics
through the standard OTLP/gRPC unary export from collector pdata's
pmetricotlp package. The data model, NVML producers, and gRPC dialer
(auth, retries, headers) are unchanged — only the wire layer swaps.

Also fix MockProducer.Collect to block on ctx so the agent doesn't
exit before the first export tick when running with the mock.
@metalmatze
metalmatze merged commit b7fb630 into main May 6, 2026
4 checks passed
@metalmatze
metalmatze deleted the worktree-otlp branch May 6, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants