-
Notifications
You must be signed in to change notification settings - Fork 28
feat(plane-enterprise): add OpenTelemetry traces/logs/metrics support #248
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
base: master
Are you sure you want to change the base?
Changes from all commits
d1e3e2a
517f2b6
54551e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||||||||||||||||||
| {{- if eq (include "plane.otel.enabled" .) "true" }} | ||||||||||||||||||||||
| # Shared OpenTelemetry env for the backend workloads. Mounted via envFrom; each | ||||||||||||||||||||||
| # workload additionally sets an inline OTEL_SERVICE_NAME (see plane.otel.serviceEnv). | ||||||||||||||||||||||
| apiVersion: v1 | ||||||||||||||||||||||
| kind: ConfigMap | ||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||
| namespace: {{ .Release.Namespace }} | ||||||||||||||||||||||
| name: {{ .Release.Name }}-otel-vars | ||||||||||||||||||||||
| data: | ||||||||||||||||||||||
| OTEL_ENABLED: "1" | ||||||||||||||||||||||
| {{- with .Values.observability.otel.endpoint }} | ||||||||||||||||||||||
| OTEL_EXPORTER_OTLP_ENDPOINT: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| OTEL_EXPORTER_OTLP_PROTOCOL: {{ .Values.observability.otel.protocol | default "grpc" | quote }} | ||||||||||||||||||||||
| {{- with .Values.observability.otel.headers }} | ||||||||||||||||||||||
| OTEL_EXPORTER_OTLP_HEADERS: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- $parts := list }} | ||||||||||||||||||||||
| {{- with .Values.observability.otel.environment }}{{- $parts = append $parts (printf "deployment.environment.name=%s" .) }}{{- end }} | ||||||||||||||||||||||
| {{- with .Values.observability.otel.resourceAttributes }}{{- $parts = append $parts . }}{{- end }} | ||||||||||||||||||||||
| {{- if $parts }} | ||||||||||||||||||||||
| OTEL_RESOURCE_ATTRIBUTES: {{ join "," $parts | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- if .Values.observability.otel.debugConsole }} | ||||||||||||||||||||||
| OTEL_DEBUG_CONSOLE: "1" | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- with .Values.observability.otel.sampler }} | ||||||||||||||||||||||
| OTEL_TRACES_SAMPLER: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- with .Values.observability.otel.samplerArg }} | ||||||||||||||||||||||
| OTEL_TRACES_SAMPLER_ARG: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- if .Values.observability.otel.frontend.enabled }} | ||||||||||||||||||||||
| FRONTEND_OTEL_ENABLED: "1" | ||||||||||||||||||||||
| {{- with .Values.observability.otel.frontend.endpoint }} | ||||||||||||||||||||||
| FRONTEND_OTLP_ENDPOINT: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
|
Comment on lines
+33
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Frontend OTEL enablement is missing endpoint gating Line 33 enables frontend OTEL based only on Suggested template fix- {{- if .Values.observability.otel.frontend.enabled }}
+ {{- if and .Values.observability.otel.frontend.enabled .Values.observability.otel.frontend.endpoint }}
FRONTEND_OTEL_ENABLED: "1"
{{- with .Values.observability.otel.frontend.endpoint }}
FRONTEND_OTLP_ENDPOINT: {{ . | quote }}
{{- end }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| {{- with .Values.observability.otel.frontend.headers }} | ||||||||||||||||||||||
| FRONTEND_OTLP_HEADERS: {{ . | quote }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move OTLP auth headers out of ConfigMap
OTEL_EXPORTER_OTLP_HEADERScan carry ingestion credentials, but this template stores it in aConfigMap. That weakens secret handling and broadens accidental exposure. Use aSecretfor sensitive OTEL header values and mount viasecretRefinstead.🤖 Prompt for AI Agents