Skip to content

Commit 8fa0f59

Browse files
author
Israel Blancas
authored
Merge branch 'main' into feature/3149
2 parents c0d9585 + 218ff4a commit 8fa0f59

File tree

8 files changed

+44
-3
lines changed

8 files changed

+44
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: 'breaking'
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: auto-instrumentation
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Enable multi instrumentation by default.
9+
10+
# One or more tracking issues related to the change
11+
issues: [3090]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
Starting with this release, the OpenTelemetry Operator now enables multi-instrumentation by default.
18+
This enhancement allows instrumentation of multiple containers in a pod with language-specific configurations.|
19+
Key Changes:
20+
- Single Instrumentation (Default Behavior): If no container names are specified using the
21+
`instrumentation.opentelemetry.io/container-names` annotation, instrumentation will be applied to the first container in
22+
the pod spec by default. This only applies when single instrumentation injection is configured.
23+
- Multi-Container Pods: In scenarios where different containers in a pod use distinct technologies, users must specify the
24+
container(s) for instrumentation using language-specific annotations. Without this specification, the default behavior may
25+
not work as expected for multi-container environments.
26+
Compatibility:
27+
- Users already utilizing the `instrumentation.opentelemetry.io/container-names` annotation do not need to take any action.
28+
Their existing setup will continue to function as before.
29+
- Important: Users who attempt to configure both `instrumentation.opentelemetry.io/container-names` and language-specific annotations
30+
(for multi-instrumentation) simultaneously will encounter an error, as this configuration is not supported.

.github/workflows/e2e.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- group: e2e-instrumentation
3939
setup: "add-instrumentation-params prepare-e2e"
4040
- group: e2e-multi-instrumentation
41-
setup: "add-multi-instrumentation-params prepare-e2e"
41+
setup: "add-instrumentation-params prepare-e2e"
4242
- group: e2e-metadata-filters
4343
setup: "add-operator-arg OPERATOR_ARG='--annotations-filter=.*filter.out --annotations-filter=config.*.gke.io.* --labels-filter=.*filter.out' prepare-e2e"
4444
- group: e2e-automatic-rbac

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func main() {
151151
"Enabling this will ensure there is only one active controller manager.")
152152
pflag.BoolVar(&createRBACPermissions, "create-rbac-permissions", false, "Automatically create RBAC permissions needed by the processors (deprecated)")
153153
pflag.BoolVar(&createOpenShiftDashboard, "openshift-create-dashboard", false, "Create an OpenShift dashboard for monitoring the OpenTelemetryCollector instances")
154-
pflag.BoolVar(&enableMultiInstrumentation, "enable-multi-instrumentation", false, "Controls whether the operator supports multi instrumentation")
154+
pflag.BoolVar(&enableMultiInstrumentation, "enable-multi-instrumentation", true, "Controls whether the operator supports multi instrumentation")
155155
pflag.BoolVar(&enableApacheHttpdInstrumentation, constants.FlagApacheHttpd, true, "Controls whether the operator supports Apache HTTPD auto-instrumentation")
156156
pflag.BoolVar(&enableDotNetInstrumentation, constants.FlagDotNet, true, "Controls whether the operator supports dotnet auto-instrumentation")
157157
pflag.BoolVar(&enableGoInstrumentation, constants.FlagGo, false, "Controls whether the operator supports Go auto-instrumentation")

tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ spec:
1313
- name: OTEL_NODE_IP
1414
valueFrom:
1515
fieldRef:
16+
apiVersion: v1
1617
fieldPath: status.hostIP
1718
- name: OTEL_POD_IP
1819
valueFrom:
1920
fieldRef:
21+
apiVersion: v1
2022
fieldPath: status.podIP
2123
- name: OTEL_SERVICE_NAME
2224
value: my-apache-multi
@@ -44,10 +46,12 @@ spec:
4446
- name: OTEL_NODE_IP
4547
valueFrom:
4648
fieldRef:
49+
apiVersion: v1
4750
fieldPath: status.hostIP
4851
- name: OTEL_POD_IP
4952
valueFrom:
5053
fieldRef:
54+
apiVersion: v1
5155
fieldPath: status.podIP
5256
- name: OTEL_SERVICE_NAME
5357
value: my-apache-multi

tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ spec:
2424
- name: OTEL_NODE_IP
2525
valueFrom:
2626
fieldRef:
27+
apiVersion: v1
2728
fieldPath: status.hostIP
2829
- name: OTEL_POD_IP
2930
valueFrom:
3031
fieldRef:
32+
apiVersion: v1
3133
fieldPath: status.podIP
3234
- name: OTEL_SERVICE_NAME
3335
value: my-apache-multi

tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ spec:
1313
- name: OTEL_NODE_IP
1414
valueFrom:
1515
fieldRef:
16+
apiVersion: v1
1617
fieldPath: status.hostIP
1718
- name: OTEL_POD_IP
1819
valueFrom:
1920
fieldRef:
21+
apiVersion: v1
2022
fieldPath: status.podIP
2123
- name: LD_LIBRARY_PATH
2224
value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib
@@ -53,10 +55,12 @@ spec:
5355
- name: OTEL_NODE_IP
5456
valueFrom:
5557
fieldRef:
58+
apiVersion: v1
5659
fieldPath: status.hostIP
5760
- name: OTEL_POD_IP
5861
valueFrom:
5962
fieldRef:
63+
apiVersion: v1
6064
fieldPath: status.podIP
6165
- name: OTEL_SERVICE_NAME
6266
value: my-nginx-multi

tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ spec:
4545
mountPath: /etc/nginx/nginx.conf
4646
subPath: nginx.conf
4747
readOnly: true
48-
imagePullPolicy: Always
4948
resources:
5049
limits:
5150
cpu: 500m

tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ spec:
2424
- name: OTEL_NODE_IP
2525
valueFrom:
2626
fieldRef:
27+
apiVersion: v1
2728
fieldPath: status.hostIP
2829
- name: OTEL_POD_IP
2930
valueFrom:
3031
fieldRef:
32+
apiVersion: v1
3133
fieldPath: status.podIP
3234
- name: LD_LIBRARY_PATH
3335
value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib

0 commit comments

Comments
 (0)