feat(helm): wire analytics-collector for frontend error capture#4
Open
dnplkndll wants to merge 1 commit into
Open
feat(helm): wire analytics-collector for frontend error capture#4dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
- Add analytics-collector deployment + service templates (was applied out-of-band) - Add ANALYTICS_COLLECTOR_URL to configmap (consumed by front bundle via /config.json) - Front deployment now exposes ANALYTICS_COLLECTOR_URL env - Ingress backends list includes /_analytics → analytics-collector:4017 - New values block `analyticsCollector.*` (image, tag, replicas, OTEL secret ref, resources) Verified on huly.hz.ledoweb.com: /config.json exposes the URL, synthetic POST to /collect returns 200 and reportOTELError forwards to the openobserve-otlp secret endpoint. Frontend window.onerror + unhandledrejection events will now flow. Signed-off-by: Don Kendall <dkendall@ledoweb.com>
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.
What changed
Wires the analytics-collector service into the Huly helm chart so browser-side errors actually reach our observability backend.
Before this PR the analytics-collector pod existed in cluster (applied out-of-band) but the front bundle had no way to discover it — every window.onerror / unhandledrejection died in the browser console.
Changes by concern
templates/analytics-collector/{deployment,service}.yaml— new (selectorapp.kubernetes.io/name=analytics-collectorto match the pre-existing live deployment for in-place adoption)templates/configmap.yaml— addsANALYTICS_COLLECTOR_URL(https://<domain>/_analytics) +_INTERNAL(http://analytics-collector:4017)templates/front/deployment.yaml— front pod consumesANALYTICS_COLLECTOR_URLfrom configmap → exposed via/config.jsonto the bundletemplates/ingress.yaml— adds/_analytics(/|$)(.*)→ svcanalytics-collector:4017analyticsCollector.*block:enabled,image,tag(defaultv0.7.382— pinned because the analytics-collector image is not part of forked builds),replicas,otelSecret.{name,endpointKey,headersKey},resourcesTest plan
helm template ... | kubectl diff— confirmed adoption path (label/annotation deltas only), no immutable-field collisionskubectl annotate/labelto add helm meta) beforehelm upgradehelm upgrade hulycompleted (revision 32) — rolled front + analytics-collectorcurl http://front:8080/config.json→ containsANALYTICS_COLLECTOR_URLPOST /collectfrom inside analytics-collector pod → HTTP 200 + log "Received batch: 1 events, 208 bytes"openobserve-openobserve-standalone.openobserve.svc:5080/api/default+ Authorization header fromopenobserve-otlpSecretCompanion: ledoent/infra MR !37 (docs).