Skip to content

fix/opentelemetry: Remove app label from otel-collector Service until collectors restart on config change - #1042

Draft
DaedalusG wants to merge 1 commit into
mainfrom
warren/revert-otel-collector-service-app-label
Draft

DaedalusG wants to merge 1 commit into
mainfrom
warren/revert-otel-collector-service-app-label

Conversation

@DaedalusG

Copy link
Copy Markdown
Contributor

Context

Problem

  • Sourcegraph Cloud renders the newest insiders chart on every reconcile. Within about 15–30 minutes of sourcegraph: render opt-in labels on every object, each key once #1038 merging, critical_otel-collector_pods_available_percentage began paging across the prod fleet: 33+ instances by 09:58 UTC, still rising.
  • Verified on flohealth: the ConfigMap had the fix and the Service had the label (applied 09:33 UTC), but the pod started Nov 27. Prometheus reported 192.168.1.131:8888 as connection refused, with up=0. Restarting the pod made the scrape up=1 and cleared the alert.

Solution

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 on main.
  • helm template -s templates/otel-collector/otel-collector.Service.yaml: the metadata labels no longer include app, and spec.selector still has app: otel-collector.
  • ./scripts/helm-docs.sh makes no changes.

… 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>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

@filiphaftek filiphaftek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch has not been deployed

No deployments
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