Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourcegraph: fix unable to scrape syntect-server metrics #385

Merged

Conversation

michaellzc
Copy link
Member

@michaellzc michaellzc commented Dec 20, 2023

Due to our prom config, service without specific labels are ignroed and won't be scraped.

https://github.com/sourcegraph/deploy-sourcegraph/blob/242be7c36d7b1b2481d62a2a95b07053311cdf54/base/prometheus/prometheus.ConfigMap.yaml#L131-L134

This PR added the missing required annotations, sourcegraph.prometheus/scrape=true, to syntect-server svc.

annotations:
prometheus.io/port: "6060"
sourcegraph.prometheus/scrape: "true"
{{- if .Values.searcher.serviceAnnotations }}
{{- toYaml .Values.searcher.serviceAnnotations | nindent 4 }}
{{- end }}
labels:

{{- if .Values.syntectServer.serviceAnnotations }}
annotations:
{{- toYaml .Values.syntectServer.serviceAnnotations | nindent 4 }}
{{- end }}

Checklist

Test plan

helm upgrade --install --create-namespace -n sourcegraph -f ./override.yaml sourcegraph charts/sourcegraph/.
k port-forward svc/sourcegraph-frontend 30080

Run up{} in explorer,

Grafana

k port-forward svc/prometheus 30090

CleanShot 2023-12-20 at 12 43 14

Copy link
Member Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@michaellzc michaellzc requested review from a team, DaedalusG and bobheadxi December 20, 2023 20:43
@michaellzc michaellzc force-pushed the 12-20-sourcegraph_fix_unable_to_scrape_syntect-server_metrics branch from 2ff82f2 to 98c4259 Compare December 20, 2023 20:49
@michaellzc michaellzc merged commit 5d63ea3 into main Dec 21, 2023
2 of 5 checks passed
@michaellzc michaellzc deleted the 12-20-sourcegraph_fix_unable_to_scrape_syntect-server_metrics branch December 21, 2023 00:44
Copy link
Contributor

@filiphaftek filiphaftek left a comment

Choose a reason for hiding this comment

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

Thx!

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.

3 participants