From 2c3c8c3da04fceb8463090f8440a49a6acebf902 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Wed, 18 Sep 2024 11:25:30 +0530 Subject: [PATCH] Run all instrumenation tests with multi-instrumentation flag added --- .github/workflows/e2e.yaml | 4 ++-- .../01-assert.yaml | 14 ++++++++++++++ .../02-assert.yaml | 12 ++++++++++++ .../01-assert.yaml | 14 ++++++++++++++ .../02-assert.yaml | 12 ++++++++++++ 5 files changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 08e6da0b83..e89abe1f59 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -36,9 +36,9 @@ jobs: - e2e-metadata-filters include: - group: e2e-instrumentation - setup: "add-instrumentation-params prepare-e2e" + setup: "add-instrumentation-params add-multi-instrumentation-params prepare-e2e" - group: e2e-multi-instrumentation - setup: "add-multi-instrumentation-params prepare-e2e" + setup: "add-instrumentation-params add-multi-instrumentation-params prepare-e2e" - group: e2e-metadata-filters setup: "add-operator-arg OPERATOR_ARG='--annotations-filter=.*filter.out --annotations-filter=config.*.gke.io.* --labels-filter=.*filter.out' prepare-e2e" - group: e2e-automatic-rbac diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml index 1e1c7f0fc4..93ed710096 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml @@ -13,10 +13,12 @@ spec: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: OTEL_SERVICE_NAME value: my-apache-multi @@ -38,16 +40,28 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName - name: OTEL_RESOURCE_ATTRIBUTES name: myapp - env: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: OTEL_SERVICE_NAME value: my-apache-multi diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml index 686504f65d..1eb9a28e0b 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml @@ -24,10 +24,12 @@ spec: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: OTEL_SERVICE_NAME value: my-apache-multi @@ -49,6 +51,16 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName - name: OTEL_RESOURCE_ATTRIBUTES name: myapp - image: rabbitmq diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml index 05b5ea6864..97b4f2df2c 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml @@ -13,10 +13,12 @@ spec: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: LD_LIBRARY_PATH value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib @@ -40,6 +42,16 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName - name: OTEL_RESOURCE_ATTRIBUTES name: myapp volumeMounts: @@ -53,10 +65,12 @@ spec: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: OTEL_SERVICE_NAME value: my-nginx-multi diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml index 620fc7d27b..7794f33c5e 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml @@ -24,10 +24,12 @@ spec: - name: OTEL_NODE_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.hostIP - name: OTEL_POD_IP valueFrom: fieldRef: + apiVersion: v1 fieldPath: status.podIP - name: LD_LIBRARY_PATH value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib @@ -51,6 +53,16 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName - name: OTEL_RESOURCE_ATTRIBUTES name: myapp volumeMounts: