[exporter/splunkhec] Define heartbeat metrics in metadata.yaml - #50942
[exporter/splunkhec] Define heartbeat metrics in metadata.yaml#50942singhvibhanshu wants to merge 1 commit into
Conversation
Signed-off-by: singhvibhanshu <find.vibhanshu@gmail.com>
|
/rerun |
| } | ||
| builder.meter = Meter(settings) | ||
| var err, errs error | ||
| builder.ExporterSplunkhecHeartbeatsFailed, err = builder.meter.Int64Counter( |
There was a problem hiding this comment.
can you use those metrics instead of defining them again in hearbeat.go?
There was a problem hiding this comment.
can you use those metrics instead of defining them again in hearbeat.go?
The default path already uses the generated counters (telemetryBuilder.ExporterSplunkhecHeartbeatsSent / ...Failed). The extra meter.Int64Counter(...) in heartbeatCounter is only a fallback for when telemetry.override_metrics_names is set, since the generated metrics have fixed names. I kept it so this PR stays a no-op for anyone relying on that option
I know, the issue mentions eventually deprecating telemetry.enabled, I'm happy to deprecate the whole custom telemetry block and use the generated metrics directly as a follow-up (after some releases, most probably after 2) so this one stays a clean migration?
WDYT?
Pull request dashboard statusWaiting on reviewers · refreshed 2026-09-13 22:34 UTC Review the latest changes. Status above doesn't look right?
|
Description
This PR moves the heartbeat metric definitions into
metadata.yamland generates them with mdatagen, using the generatedTelemetryBuilderin the exporter instead of hand-creating the counters.This is a no-op for users: the emitted metric names (
otelcol_exporter_splunkhec_heartbeats_sent/_failed) are unchanged, and thetelemetry.enabled,telemetry.override_metrics_names, andtelemetry.extra_attributesoptions continue to behave as before.Link to tracking issue
Fixes #49009
Testing
Tuned.
Documentation
Tuned.
Authorship