Skip to content

receiver/httpcheck: stop double-emitting TLS cert-remaining data point#47831

Open
SAY-5 wants to merge 1 commit intoopen-telemetry:mainfrom
SAY-5:fix/httpcheck-dedup-tls-cert-remaining-47740
Open

receiver/httpcheck: stop double-emitting TLS cert-remaining data point#47831
SAY-5 wants to merge 1 commit intoopen-telemetry:mainfrom
SAY-5:fix/httpcheck-dedup-tls-cert-remaining-47740

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 21, 2026

Description:

RecordHttpcheckTLSCertRemainingDataPoint was called twice per scrape for every HTTPS endpoint: once inside the mux.Lock block before the timing metrics, and again a few lines lower after the timing metrics. The two blocks were byte-for-byte equivalent, so the receiver emitted duplicate httpcheck.tls.cert_remaining data points on every cycle.

Link to tracking issue: Fixes #47740

Testing: go test ./receiver/httpcheckreceiver/... -count=1 passes.

Documentation: Added .chloggen/47740-httpcheck-dedup-tls-cert-remaining.yaml under bug_fix.

Signed-off-by: SAY-5 SAY-5@users.noreply.github.com
Assisted-by: Claude Opus 4.7

RecordHttpcheckTLSCertRemainingDataPoint was called twice per scrape
for every HTTPS endpoint: once inside the mux.Lock block before the
timing metrics, and again a few lines lower after the timing metrics.
The two blocks were byte-for-byte equivalent, so the receiver emitted
duplicate httpcheck.tls.cert_remaining data points on every cycle.

Remove the redundant pre-timing block. The post-timing block keeps
the endpoint/issuer/commonName/sans labels unchanged.

Fixes open-telemetry#47740.

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
Assisted-by: Claude Opus 4.7
@SAY-5 SAY-5 requested a review from a team as a code owner April 21, 2026 19:26
@SAY-5 SAY-5 requested a review from ChrsMark April 21, 2026 19:26
@github-actions github-actions Bot added the first-time contributor PRs made by new contributors label Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@github-actions github-actions Bot added the receiver/httpcheck HTTP Check receiver label Apr 21, 2026
@github-actions github-actions Bot requested a review from VenuEmmadi April 21, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time contributor PRs made by new contributors receiver/httpcheck HTTP Check receiver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[receiver/httpcheck] RecordHttpcheckTLSCertRemainingDataPoint is called twice per scrape causing duplicate metrics

2 participants