Skip to content

Commit 9f10d49

Browse files
jinja2crobert-1
andauthored
Use splunk-otel-python for python auto-instrumentation (#1965)
* Use splunk-otel-python for python auto-instrumentation * use latest image * add changelog * update docs * resolve conflicts * ignore telemetry.auto.version * fix attr ignore * Update .chloggen/splunk-otel-python.yaml Co-authored-by: Curtis Robert <crobert@splunk.com> * Update .chloggen/splunk-otel-python.yaml Co-authored-by: Curtis Robert <crobert@splunk.com> * Update functional_tests/functional/testdata/python/deployment.yaml --------- Co-authored-by: Curtis Robert <crobert@splunk.com>
1 parent 753ab13 commit 9f10d49

File tree

8 files changed

+66
-49
lines changed

8 files changed

+66
-49
lines changed

.chloggen/splunk-otel-python.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
4+
component: operator
5+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
6+
note: Use [splunk-otel-instrumentation-python](quay.io/signalfx/splunk-otel-instrumentation-python) image for auto-instrumentation of Python applications with the operator.
7+
# One or more tracking issues related to the change
8+
issues: [1965]
9+
# (Optional) One or more lines of additional information to render under the primary note.
10+
# These lines will be padded with 2 spaces and then inserted directly into the document.
11+
# Use pipe (|) for multiline entries.
12+
subtext: |
13+
- To use a different image for Python auto-instrumentation, set the configuration option `instrumentation.python.image`.

docs/auto-instrumentation-install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,11 @@ provides best effort support with issues related to native OpenTelemetry instrum
447447
| java | Splunk | Available | Yes | Completely | [Link](github.com/signalfx/splunk-otel-java) | ghcr.io/signalfx/splunk-otel-java/splunk-otel-java |
448448
| dotnet | Splunk | Coming Soon | | | [Link](github.com/signalfx/splunk-otel-dotnet) | ghcr.io/signalfx/splunk-otel-dotnet/splunk-otel-dotnet |
449449
| nodejs | Splunk | Available | Yes | Completely | [Link](github.com/signalfx/splunk-otel-nodejs) | ghcr.io/signalfx/splunk-otel-js/splunk-otel-js |
450-
| python | Splunk | Coming Soon | | | [Link](github.com/signalfx/splunk-otel-python) | |
450+
| python | Splunk | Available | Yes | Completely | [Link](github.com/signalfx/splunk-otel-python) | quay.io/signalfx/splunk-otel-instrumentation-python |
451451
| java | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-java-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java |
452452
| dotnet | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet |
453453
| nodejs | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-nodejs-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodes |
454-
| python | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-java-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java |
454+
| python | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-python-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python |
455455
| apache-httpd | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-apache-httpd-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd |
456456
| nginx | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-apache-httpd-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd |
457457

examples/enable-operator-and-auto-instrumentation/rendered_manifests/operator/instrumentation.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ spec:
7878
image: ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.3.0
7979
python:
8080
env:
81+
- name: OTEL_EXPERIMENTAL_RESOURCE_DETECTORS
82+
value: ""
8183
- name: OTEL_RESOURCE_ATTRIBUTES
82-
value: splunk.zc.method=autoinstrumentation-python:0.58b0
84+
value: splunk.zc.method=splunk-otel-instrumentation-python:v2.7.0
8385
- name: OTEL_EXPORTER_OTLP_ENDPOINT
8486
value: http://default-splunk-otel-collector-agent.default.svc.cluster.local:4318
85-
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.58b0
87+
image: quay.io/signalfx/splunk-otel-instrumentation-python:v2.7.0

functional_tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ kind load docker-image quay.io/splunko11ytest/python_test:latest --name kind
7575
# On Mac M1s, you can also push this image so kind doesn't get confused with the platform to use:
7676
kind load docker-image ghcr.io/signalfx/splunk-otel-dotnet/splunk-otel-dotnet:v1.11.0 --name kind
7777
kind load docker-image ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.3.0 --name kind
78-
kind load docker-image ghcr.io/signalfx/splunk-otel-java/splunk-otel-java:v2.19.0 --name kind
78+
kind load docker-image ghcr.io/signalfx/splunk-otel-java/splunk-otel-java:v2.20.1 --name kind
7979
kind load docker-image quay.io/signalfx/splunk-otel-instrumentation-python:v2.7.0 --name kind
8080
```
8181

functional_tests/functional/functional_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ func testPythonTraces(t *testing.T) {
733733
ptracetest.IgnoreResourceAttributeValue("telemetry.distro.version"),
734734
ptracetest.IgnoreResourceAttributeValue("telemetry.sdk.version"),
735735
ptracetest.IgnoreResourceAttributeValue("service.instance.id"),
736+
ptracetest.IgnoreResourceAttributeValue("telemetry.auto.version"),
736737
ptracetest.IgnoreSpanAttributeValue("http.user_agent"),
737738
ptracetest.IgnoreSpanAttributeValue("net.peer.port"),
738739
ptracetest.IgnoreSpanAttributeValue("network.peer.port"),

functional_tests/functional/testdata/expected_kind_values/expected_python_traces.yaml

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ resourceSpans:
99
stringValue: opentelemetry
1010
- key: telemetry.sdk.version
1111
value:
12-
stringValue: 1.33.1
12+
stringValue: 1.36.0
1313
- key: splunk.zc.method
1414
value:
15-
stringValue: autoinstrumentation-python:0.58b0
15+
stringValue: splunk-otel-instrumentation-python:v2.7.0
1616
- key: k8s.container.name
1717
value:
1818
stringValue: python-test
@@ -27,31 +27,37 @@ resourceSpans:
2727
stringValue: kind-control-plane
2828
- key: k8s.pod.name
2929
value:
30-
stringValue: python-test-68df75b848-487j8
30+
stringValue: python-test-7b649494c8-jvbsr
3131
- key: k8s.replicaset.name
3232
value:
33-
stringValue: python-test-68df75b848
33+
stringValue: python-test-7b649494c8
3434
- key: service.instance.id
3535
value:
36-
stringValue: default.python-test-68df75b848-487j8.python-test
36+
stringValue: default.python-test-7b649494c8-jvbsr.python-test
3737
- key: service.namespace
3838
value:
3939
stringValue: default
4040
- key: service.version
4141
value:
4242
stringValue: latest
43+
- key: telemetry.distro.name
44+
value:
45+
stringValue: splunk-opentelemetry
46+
- key: telemetry.distro.version
47+
value:
48+
stringValue: 2.7.0
4349
- key: service.name
4450
value:
4551
stringValue: python-test
4652
- key: telemetry.auto.version
4753
value:
48-
stringValue: 0.58b0
54+
stringValue: 0.57b0
4955
- key: k8s.pod.ip
5056
value:
51-
stringValue: 10.244.0.12
57+
stringValue: 10.244.0.15
5258
- key: k8s.pod.uid
5359
value:
54-
stringValue: 454afbf5-b8f1-4bc9-a2a5-e191927e9bcd
60+
stringValue: 962b3a7e-8138-4928-92cd-568a7369c763
5561
- key: k8s.pod.labels.app
5662
value:
5763
stringValue: python-test
@@ -63,7 +69,7 @@ resourceSpans:
6369
stringValue: latest
6470
- key: container.id
6571
value:
66-
stringValue: 592075a79e4399d54931b32d858fffd6389137ea582e014165a1198249f35584
72+
stringValue: 6fc6b3cb6070be459c39c363fd77a159cf523efb35b7a11323c6df107a8a2857
6773
- key: host.name
6874
value:
6975
stringValue: kind-control-plane
@@ -118,7 +124,7 @@ resourceSpans:
118124
stringValue: 127.0.0.1
119125
- key: net.peer.port
120126
value:
121-
intValue: "51628"
127+
intValue: "42214"
122128
- key: http.user_agent
123129
value:
124130
stringValue: curl/8.11.1
@@ -131,15 +137,14 @@ resourceSpans:
131137
- key: http.status_code
132138
value:
133139
intValue: "200"
134-
endTimeUnixNano: "1752511848542835502"
140+
endTimeUnixNano: "1757980322140909459"
135141
flags: 256
136142
kind: 2
137143
name: GET /
138-
parentSpanId: ""
139-
spanId: 890189b3532bbc4d
140-
startTimeUnixNano: "1752511848542267562"
144+
spanId: e67f0a593fceb942
145+
startTimeUnixNano: "1757980322139768959"
141146
status: {}
142-
traceId: ddb5bc5ef8e96c6647193763f6fb7162
147+
traceId: bc20afd3b43c1d752ca1553d685eea77
143148
- attributes:
144149
- key: http.method
145150
value:
@@ -167,7 +172,7 @@ resourceSpans:
167172
stringValue: 127.0.0.1
168173
- key: net.peer.port
169174
value:
170-
intValue: "51632"
175+
intValue: "42230"
171176
- key: http.user_agent
172177
value:
173178
stringValue: curl/8.11.1
@@ -180,15 +185,14 @@ resourceSpans:
180185
- key: http.status_code
181186
value:
182187
intValue: "200"
183-
endTimeUnixNano: "1752511849544449800"
188+
endTimeUnixNano: "1757980323141819543"
184189
flags: 256
185190
kind: 2
186191
name: GET /
187-
parentSpanId: ""
188-
spanId: 8e221ca3ed9436ec
189-
startTimeUnixNano: "1752511849543758860"
192+
spanId: d3ffde602abe2553
193+
startTimeUnixNano: "1757980323141274543"
190194
status: {}
191-
traceId: b5560eb3d564a0eff5eb3b9ab242de24
195+
traceId: 4bf722b746efb2809c08a937d2f154e0
192196
- attributes:
193197
- key: http.method
194198
value:
@@ -216,7 +220,7 @@ resourceSpans:
216220
stringValue: 127.0.0.1
217221
- key: net.peer.port
218222
value:
219-
intValue: "51648"
223+
intValue: "42234"
220224
- key: http.user_agent
221225
value:
222226
stringValue: curl/8.11.1
@@ -229,15 +233,14 @@ resourceSpans:
229233
- key: http.status_code
230234
value:
231235
intValue: "200"
232-
endTimeUnixNano: "1752511850545363608"
236+
endTimeUnixNano: "1757980324146844502"
233237
flags: 256
234238
kind: 2
235239
name: GET /
236-
parentSpanId: ""
237-
spanId: 0affd31c40064e50
238-
startTimeUnixNano: "1752511850544756385"
240+
spanId: 0bc2c0a406cc9069
241+
startTimeUnixNano: "1757980324145793210"
239242
status: {}
240-
traceId: 5283439627a5dd4b6152a578aede7ba1
243+
traceId: 54b69d6dba73b9c7a40f4a8a5b21f147
241244
- attributes:
242245
- key: http.method
243246
value:
@@ -265,7 +268,7 @@ resourceSpans:
265268
stringValue: 127.0.0.1
266269
- key: net.peer.port
267270
value:
268-
intValue: "51656"
271+
intValue: "42246"
269272
- key: http.user_agent
270273
value:
271274
stringValue: curl/8.11.1
@@ -278,15 +281,14 @@ resourceSpans:
278281
- key: http.status_code
279282
value:
280283
intValue: "200"
281-
endTimeUnixNano: "1752511851546191010"
284+
endTimeUnixNano: "1757980325151610377"
282285
flags: 256
283286
kind: 2
284287
name: GET /
285-
parentSpanId: ""
286-
spanId: 5f97e4fe41460d1c
287-
startTimeUnixNano: "1752511851545604095"
288+
spanId: 42f2164eef8a5ce6
289+
startTimeUnixNano: "1757980325150843502"
288290
status: {}
289-
traceId: e0b4111d150c880d3f1c77279d9054af
291+
traceId: 6adb27eaba34adcfc28f05506f337767
290292
- attributes:
291293
- key: http.method
292294
value:
@@ -314,7 +316,7 @@ resourceSpans:
314316
stringValue: 127.0.0.1
315317
- key: net.peer.port
316318
value:
317-
intValue: "51660"
319+
intValue: "42254"
318320
- key: http.user_agent
319321
value:
320322
stringValue: curl/8.11.1
@@ -327,12 +329,11 @@ resourceSpans:
327329
- key: http.status_code
328330
value:
329331
intValue: "200"
330-
endTimeUnixNano: "1752511852547236754"
332+
endTimeUnixNano: "1757980326159328419"
331333
flags: 256
332334
kind: 2
333335
name: GET /
334-
parentSpanId: ""
335-
spanId: f8f8482a02914e7d
336-
startTimeUnixNano: "1752511852546621957"
336+
spanId: 09ec0a6f152fc0e5
337+
startTimeUnixNano: "1757980326158140128"
337338
status: {}
338-
traceId: 2cc9fcb5842a8ff2279140bf7a916282
339+
traceId: 72d68b2e4e9fb9f0554967e4154b62db

functional_tests/functional/testdata/python/start.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
python3 web.py &
44
pypid=$!
55

6-
76
loop=0
87

98
function stop()

helm-charts/splunk-otel-collector/values.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,10 +1349,11 @@ instrumentation:
13491349
# - name: NODEJS_ENV_VAR
13501350
# value: nodejs_value
13511351
python:
1352-
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.58b0
1353-
# env:
1354-
# - name: PYTHON_ENV_VAR
1355-
# value: python_value
1352+
image: quay.io/signalfx/splunk-otel-instrumentation-python:v2.7.0
1353+
env:
1354+
- name: OTEL_EXPERIMENTAL_RESOURCE_DETECTORS
1355+
value: ""
1356+
13561357
# Auto-instrumentation Libraries (End)
13571358

13581359
# Note - Installing certmanager as a subchart is deprecated and will be removed in the future.

0 commit comments

Comments
 (0)