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

feat: Adding instrumentation specific settings and adjust whitespacing #71

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/kube-otel-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kube-otel-stack
description: Chart for sending Kubernetes metrics to Lightstep using the OpenTelemetry Operator.
type: application
version: 0.4.0
version: 0.4.1
appVersion: 0.91.0
dependencies:
# cert manager must be manually installed because it has CRDs
Expand Down
38 changes: 26 additions & 12 deletions charts/kube-otel-stack/templates/autoinstrumentation.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.autoinstrumentation.enabled }}
{{- if .Values.autoinstrumentation.enabled }}
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
Expand All @@ -7,17 +7,31 @@ spec:
exporter:
endpoint: http://{{ $.Release.Name }}-{{ .Values.autoinstrumentation.collectorTarget }}-collector.{{ $.Release.Namespace }}:4317
propagators:
{{ toYaml .Values.autoinstrumentation.propagators | indent 4 }}
{{ with .Values.autoinstrumentation.sampler }}
{{- toYaml .Values.autoinstrumentation.propagators | nindent 4 }}
{{- with .Values.autoinstrumentation.sampler }}
sampler:
{{ toYaml . | indent 4 }}
{{ end }}
{{ with .Values.autoinstrumentation.env }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.autoinstrumentation.env }}
env:
{{ toYaml . | indent 4 }}
{{ end }}
{{ with .Values.autoinstrumentation.resource }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.autoinstrumentation.resource }}
resource:
{{ toYaml . | indent 4 }}
{{ end }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- range $language, $settings := .Values.autoinstrumentation.languageSettings }}
{{ $language }}:
{{- with $settings.env }}
env:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if $settings.image }}
image: {{ $settings.image | quote }}
{{- end }}
{{- with $settings.resources }}
resources:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
11 changes: 10 additions & 1 deletion charts/kube-otel-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ autoinstrumentation:
## The value depends on the sampler type.
## For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
argument: "0.25"

languageSettings: {}
# LanguageSettings defines the language specific settings for auto-instrumentation. Example:
# python:
# env:
# - name: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
# value: "true"
# - name: OTEL_TRACES_EXPORTER
# value: "otlp"
# image: "<custom-image>"
# resources: {}
## A list of corev1.EnvVars
env: []

Expand Down
Loading