Repository navigation
Conversation
… collectors restart on config change #1038 added app: otel-collector to the otel-collector Service, which exposed the collector's self-metrics target to the otel-collector pods-available alert. Running collectors keep their old config (metrics on 127.0.0.1) because a ConfigMap change does not restart them, so the scrape fails and the critical alert fires. Amp-Thread-ID: https://ampcode.com/threads/T-0663d63f-0fe9-4e5d-b765-d41e340cff02 Co-authored-by: Amp <amp@ampcode.com>
filiphaftek
requested changes
Dec 1, 2026
filiphaftek
left a comment
Contributor
There was a problem hiding this comment.
I propose we close it, we force restart once and fleet is good: https://ampcode.com/threads/T-01a1c163-321b-779c-a0a8-3cd8531663f9?thread=T-0663d63f-0fe9-4e5d-b765-d41e340cff02
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
app: otel-collectorto theotel-collectorService. Prometheus copies Service labels onto scraped metrics, so the collector's self-metrics target became visible to theotel-collector"pods available" alert (up{app=~".*otel-collector"}).0.0.0.0:8888. But theotel-collectorDeployment has no config checksum on its pod template, so updating the ConfigMap does not restart running collectors. They keep serving metrics on127.0.0.1:8888.Problem
critical_otel-collector_pods_available_percentagebegan paging across the prod fleet: 33+ instances by 09:58 UTC, still rising.192.168.1.131:8888asconnection refused, withup=0. Restarting the pod made the scrapeup=1and cleared the alert.Solution
app: otel-collectorfrom the Service metadata labels, so the alert no longer selects the target and the fleet goes back to its pre-sourcegraph: render opt-in labels on every object, each key once #1038 behavior. The selector keepsapp: otel-collector.helm upgrade, the label is removed from live Services and the alert's series disappears.checksum/configpod annotation), so the fix in fix/opentelemetry: Fix OpenTelemetry Collector's custom exporters config to expose metrics #1039 actually takes effect.Checklist
Test plan
helm unittest ./charts/sourcegraph(helm-unittest v1.0.2, as in CI): 46 suites, 317 tests, and 120 snapshots pass, the same as onmain.helm template -s templates/otel-collector/otel-collector.Service.yaml: the metadata labels no longer includeapp, andspec.selectorstill hasapp: otel-collector../scripts/helm-docs.shmakes no changes.