From 4b2aead0b0c42db4b759e853a889ecf84d78118c Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Tue, 24 Oct 2023 16:32:38 +0800 Subject: [PATCH] feat: add musl build to python autoinstrumentation --- README.md | 7 +- autoinstrumentation/python/Dockerfile | 13 +- pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/podmutator.go | 1 + pkg/instrumentation/podmutator_test.go | 14 +- pkg/instrumentation/python.go | 26 ++- pkg/instrumentation/python_test.go | 205 +++++++++++++++++- pkg/instrumentation/sdk.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- .../instrumentation-python/01-assert.yaml | 3 +- .../01-install-app.yaml | 1 + 11 files changed, 249 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index cc7bc896bd..5de7fde40e 100644 --- a/README.md +++ b/README.md @@ -250,8 +250,13 @@ instrumentation.opentelemetry.io/inject-nodejs: "true" ``` Python: +Python auto-instrumentation also honors an annotation that will be used to set Python runtime C library implementation. +Currently, two C library implementations are supported: `linux-x64` and `linux-musl-x64`. +By default `linux-x64` is used. ```bash -instrumentation.opentelemetry.io/inject-python: "true" +instrumentation.opentelemetry.io/inject-: "true" +instrumentation.opentelemetry.io/otel-python-auto-runtime: "linux-x64" # for Linux glibc based images, this is default value and can be omitted +instrumentation.opentelemetry.io/otel-python-auto-runtime: "linux-musl-x64" # for Linux musl based images ``` .NET: diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index 9a6dfa7403..85f0b88fb6 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -9,6 +9,7 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. +# - Please note that we build twice. First time for environments with libc and second time with musl C implementations FROM python:3.11 AS build WORKDIR /operator-build @@ -17,8 +18,18 @@ ADD requirements.txt . RUN mkdir workspace && pip install --target workspace -r requirements.txt +FROM python:3.11-alpine AS build-musl + +WORKDIR /operator-build + +ADD requirements.txt . + +RUN apk add --update --no-cache gcc musl-dev linux-headers +RUN mkdir workspace && pip install --target workspace -r requirements.txt + FROM busybox -COPY --from=build /operator-build/workspace /autoinstrumentation +COPY --from=build /operator-build/workspace /autoinstrumentation/linux-x64 +COPY --from=build-musl /operator-build/workspace /autoinstrumentation/linux-musl-x64 RUN chmod -R go+r /autoinstrumentation diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 28ef7bf3d5..231aec4338 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -29,6 +29,7 @@ const ( annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" annotationInjectNodeJSContainersName = "instrumentation.opentelemetry.io/nodejs-container-names" annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" + annotationPythonRuntime = "instrumentation.opentelemetry.io/otel-python-auto-runtime" annotationInjectPythonContainersName = "instrumentation.opentelemetry.io/python-container-names" annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" annotationDotNetRuntime = "instrumentation.opentelemetry.io/otel-dotnet-auto-runtime" diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 0a7878ae19..6f191b41fe 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -252,6 +252,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } if featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() || inst == nil { insts.Python.Instrumentation = inst + insts.Python.AdditionalAnnotations = map[string]string{annotationPythonRuntime: annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationPythonRuntime)} } else { logger.Error(nil, "support for Python auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Python auto instrumentation is not enabled") diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index bbe8397f1b..a10485a4ef 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1205,7 +1205,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", @@ -1393,7 +1393,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", @@ -1472,7 +1472,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", @@ -3743,7 +3743,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_TRACES_EXPORTER", @@ -3806,7 +3806,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_TRACES_EXPORTER", @@ -4401,7 +4401,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_TRACES_EXPORTER", @@ -4464,7 +4464,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_TRACES_EXPORTER", diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 0be23ee413..f7a7c46cab 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -28,14 +28,21 @@ const ( envOtelMetricsExporter = "OTEL_METRICS_EXPORTER" envOtelExporterOTLPTracesProtocol = "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" envOtelExporterOTLPMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL" - pythonPathPrefix = "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation" - pythonPathSuffix = "/otel-auto-instrumentation-python" + pythonPathGlibcPrefix = "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation" + pythonPathGlibcSuffix = "/otel-auto-instrumentation-python/linux-x64" + pythonPathMuslPrefix = "/otel-auto-instrumentation-python/linux-musl-x64/opentelemetry/instrumentation/auto_instrumentation" + pythonPathMuslSuffix = "/otel-auto-instrumentation-python/linux-musl-x64" pythonInstrMountPath = "/otel-auto-instrumentation-python" pythonVolumeName = volumeName + "-python" pythonInitContainerName = initContainerName + "-python" ) -func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (corev1.Pod, error) { +const ( + pythonRuntimeLinuxGlibc = "linux-x64" + pythonRuntimeLinuxMusl = "linux-musl-x64" +) + +func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int, runtime string) (corev1.Pod, error) { // caller checks if there is at least one container. container := &pod.Spec.Containers[index] @@ -44,6 +51,19 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor return pod, err } + pythonPathPrefix := "" + pythonPathSuffix := "" + switch runtime { + case "", pythonRuntimeLinuxGlibc: + pythonPathPrefix = pythonPathGlibcPrefix + pythonPathSuffix = pythonPathGlibcSuffix + case pythonRuntimeLinuxMusl: + pythonPathPrefix = pythonPathMuslPrefix + pythonPathSuffix = pythonPathMuslSuffix + default: + return pod, fmt.Errorf("provided instrumentation.opentelemetry.io/otel-python-auto-runtime annotation value '%s' is not supported", runtime) + } + // inject Python instrumentation spec env vars. for _, env := range pythonSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 7f7510c719..d2b813f508 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -20,6 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -29,6 +30,7 @@ func TestInjectPythonSDK(t *testing.T) { name string v1alpha1.Python pod corev1.Pod + runtime string expected corev1.Pod err error }{ @@ -56,7 +58,7 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonInitContainerName, Image: "foo/bar:1", Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ @@ -76,7 +78,7 @@ func TestInjectPythonSDK(t *testing.T) { Env: []corev1.EnvVar{ { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python/linux-x64"), }, { Name: "OTEL_TRACES_EXPORTER", @@ -122,7 +124,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -132,7 +134,7 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonInitContainerName, Image: "foo/bar:1", Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ @@ -153,7 +155,7 @@ func TestInjectPythonSDK(t *testing.T) { Env: []corev1.EnvVar{ { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/foo:/bar", "/otel-auto-instrumentation-python"), + Value: fmt.Sprintf("%s:%s:%s", "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation", "/foo:/bar", "/otel-auto-instrumentation-python/linux-x64"), }, { Name: "OTEL_TRACES_EXPORTER", @@ -209,7 +211,7 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonInitContainerName, Image: "foo/bar:1", Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ @@ -233,7 +235,7 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python/linux-x64"), }, { Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", @@ -275,7 +277,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -285,7 +287,7 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: "opentelemetry-auto-instrumentation-python", + Name: pythonInitContainerName, Image: "foo/bar:1", Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ @@ -309,7 +311,7 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python/linux-x64"), }, { Name: "OTEL_TRACES_EXPORTER", @@ -363,11 +365,192 @@ func TestInjectPythonSDK(t *testing.T) { }, err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envPythonPath), }, + { + name: "runtime linux-x64", + Python: v1alpha1.Python{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationPythonRuntime: pythonRuntimeLinuxGlibc, + }, + }, + }, + runtime: pythonRuntimeLinuxGlibc, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: pythonVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: pythonInitContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/linux-x64/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python/linux-x64"), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + }, + }, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationPythonRuntime: pythonRuntimeLinuxGlibc, + }, + }, + }, + err: nil, + }, + { + name: "runtime linux-musl-x64", + Python: v1alpha1.Python{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationPythonRuntime: pythonRuntimeLinuxMusl, + }, + }, + }, + runtime: pythonRuntimeLinuxMusl, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: pythonVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: pythonInitContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/linux-musl-x64/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python/linux-musl-x64"), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + }, + }, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationPythonRuntime: pythonRuntimeLinuxMusl, + }, + }, + }, + err: nil, + }, + { + name: "runtime not-supported", + Python: v1alpha1.Python{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{}, + }, + runtime: "not-supported", + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + err: fmt.Errorf("provided instrumentation.opentelemetry.io/otel-python-auto-runtime annotation value 'not-supported' is not supported"), + }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod, err := injectPythonSDK(test.Python, test.pod, 0) + pod, err := injectPythonSDK(test.Python, test.pod, 0, test.runtime) assert.Equal(t, test.expected, pod) assert.Equal(t, test.err, err) }) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 8d945339a8..addce18b25 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -103,7 +103,7 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations for _, container := range strings.Split(pythonContainers, ",") { index := getContainerIndex(container, pod) - pod, err = injectPythonSDK(otelinst.Spec.Python, pod, index) + pod, err = injectPythonSDK(otelinst.Spec.Python, pod, index, insts.Python.AdditionalAnnotations[annotationPythonRuntime]) if err != nil { i.logger.Info("Skipping Python SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index af34d0df34..6ff304e5f1 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -762,7 +762,7 @@ func TestInjectPython(t *testing.T) { Env: []corev1.EnvVar{ { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", pythonPathGlibcPrefix, pythonPathGlibcSuffix), }, { Name: "OTEL_TRACES_EXPORTER", diff --git a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml index b2d8d02aaa..355026706c 100644 --- a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml @@ -4,6 +4,7 @@ metadata: annotations: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/otel-python-auto-runtime: "linux-musl-x64" labels: app: my-pod-with-sidecar spec: @@ -17,7 +18,7 @@ spec: - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4318 - name: PYTHONPATH - value: "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python" + value: "/otel-auto-instrumentation-python/linux-musl-x64/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python" - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL value: http/protobuf - name: OTEL_METRICS_EXPORTER diff --git a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml index 982b439460..33969b967b 100644 --- a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml @@ -14,6 +14,7 @@ spec: annotations: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/otel-python-auto-runtime: "linux-musl-x64" spec: securityContext: runAsUser: 1000