Skip to content

Commit 06c95f6

Browse files
authored
Upgrade NodeJS instrumentation to v3.1.2 (#1800)
* Upgrade NodeJS instrumentation version * Add .chloggen file * Update node version on test image * Symmetrical OTLP/HTTP config * Changes with workaround on Docker image * Workaround stale nodejs_test image * Remove --platform from docker build (workaround) * Need image echoing "Hello World" to pass agent_logs test * Change the default OTLP endpoint for NodeJS * Clean up * Update changelog PR #
1 parent 5e4bc97 commit 06c95f6

File tree

11 files changed

+131
-98
lines changed

11 files changed

+131
-98
lines changed

.chloggen/update-nodejs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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: Bump nodejs to v3.1.2 in helm-charts/splunk-otel-collector/values.yaml
7+
# One or more tracking issues related to the change
8+
issues: [1800]
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:

.github/workflows/functional_test_v2.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ jobs:
6868
- name: Update dependencies
6969
run: |
7070
make dep-update
71+
- name: Temporary generate new nodejs image - do not upload it
72+
working-directory: functional_tests/functional/testdata/nodejs
73+
run: docker buildx build --file Dockerfile --tag quay.io/splunko11ytest/nodejs_test:latest .
74+
- name: Temporary update nodejs image to be used by kind
75+
working-directory: functional_tests
76+
run: kind load docker-image quay.io/splunko11ytest/nodejs_test:latest --name kind
7177
- name: run functional tests
7278
id: run-functional-tests
7379
env:

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,14 @@ spec:
6161
- name: OTEL_RESOURCE_ATTRIBUTES
6262
value: splunk.zc.method=autoinstrumentation-apache-httpd:1.0.4
6363
nodejs:
64-
image: ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v2.15.0
64+
image: ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.1.2
6565
env:
6666
- name: OTEL_RESOURCE_ATTRIBUTES
67-
value: splunk.zc.method=splunk-otel-js:v2.15.0
67+
value: splunk.zc.method=splunk-otel-js:v3.1.2
68+
# nodejs auto-instrumentation uses http/proto by default, so data must be sent to 4318 instead of 4317.
69+
# See: https://github.com/open-telemetry/opentelemetry-operator#opentelemetry-auto-instrumentation-injection
70+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
71+
value: http://default-splunk-otel-collector-agent.default.svc.cluster.local:4318
6872
python:
6973
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.51b0
7074
env:

functional_tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ export KUBE_TEST_ENV=kind
99
export K8S_VERSION=v1.29.0
1010
kind create cluster --kubeconfig=/tmp/kube-config-splunk-otel-collector-chart-functional-testing --config=.github/workflows/configs/kind-config.yaml --image=kindest/node:$K8S_VERSION
1111
kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve
12-
make cert-manager
12+
make dep-update
1313
kind load docker-image quay.io/splunko11ytest/nodejs_test:latest --name kind
1414
kind load docker-image quay.io/splunko11ytest/java_test:latest --name kind
1515
kind load docker-image quay.io/splunko11ytest/dotnet_test:latest --name kind
1616
# On Mac M1s, you can also push this image so kind doesn't get confused with the platform to use:
1717
kind load docker-image ghcr.io/signalfx/splunk-otel-dotnet/splunk-otel-dotnet:v1.8.0 --name kind
18-
kind load docker-image ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v2.4.4 --name kind
18+
kind load docker-image ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.1.2 --name kind
1919
kind load docker-image ghcr.io/signalfx/splunk-otel-java/splunk-otel-java:v1.30.0 --name kind
2020
kind load docker-image ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.50b0 --name kind
2121
```

functional_tests/functional/functional_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ func deployChartsAndApps(t *testing.T, testKubeConfig string) {
187187
"LogHecEndpoint": fmt.Sprintf("http://%s:%d", hostEp, internal.HECLogsReceiverPort),
188188
"MetricHecEndpoint": fmt.Sprintf("http://%s:%d/services/collector", hostEp, internal.HECMetricsReceiverPort),
189189
"OtlpEndpoint": fmt.Sprintf("%s:%d", hostEp, internal.OTLPGRPCReceiverPort),
190+
"OtlpHttpEndpoint": fmt.Sprintf("%s:%d", hostEp, internal.OTLPHTTPReceiverPort),
190191
"ApiURLEndpoint": fmt.Sprintf("http://%s:%d", hostEp, internal.SignalFxAPIPort),
191192
"LogObjectsHecEndpoint": fmt.Sprintf("http://%s:%d/services/collector", hostEp, internal.HECObjectsReceiverPort),
192193
"KubeTestEnv": kubeTestEnv,
@@ -557,6 +558,7 @@ func testNodeJSTraces(t *testing.T) {
557558
ptracetest.IgnoreEndTimestamp(),
558559
ptracetest.IgnoreResourceSpansOrder(),
559560
ptracetest.IgnoreScopeSpansOrder(),
561+
ptracetest.IgnoreScopeSpanInstrumentationScopeVersion(),
560562
)
561563
if err != nil && os.Getenv("UPDATE_EXPECTED_RESULTS") == "true" {
562564
internal.WriteNewExpectedTracesResult(t, expectedTracesFile, selectedTrace)

functional_tests/functional/testdata/expected_eks_values/expected_nodejs_traces.yaml

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ resourceSpans:
1212
stringValue: opentelemetry
1313
- key: telemetry.sdk.version
1414
value:
15-
stringValue: 1.28.0
16-
- key: splunk.distro.version
15+
stringValue: 1.30.0
16+
- key: telemetry.distro.name
1717
value:
18-
stringValue: 2.15.0
18+
stringValue: splunk-nodejs
19+
- key: telemetry.distro.version
20+
value:
21+
stringValue: 3.1.2
1922
- key: splunk.zc.method
2023
value:
21-
stringValue: splunk-otel-js:v2.15.0
24+
stringValue: splunk-otel-js:v3.1.2
2225
- key: k8s.container.name
2326
value:
2427
stringValue: nodejs-test
@@ -33,13 +36,16 @@ resourceSpans:
3336
stringValue: kind-control-plane
3437
- key: k8s.pod.name
3538
value:
36-
stringValue: nodejs-test-56b74df9ff-pzbkl
39+
stringValue: nodejs-test-5fbcbff576-k9trt
3740
- key: k8s.replicaset.name
3841
value:
39-
stringValue: nodejs-test-56b74df9ff
42+
stringValue: nodejs-test-5fbcbff576
4043
- key: service.instance.id
4144
value:
42-
stringValue: default.nodejs-test-56b74df9ff-pzbkl.nodejs-test
45+
stringValue: default.nodejs-test-5fbcbff576-k9trt.nodejs-test
46+
- key: service.namespace
47+
value:
48+
stringValue: default
4349
- key: service.version
4450
value:
4551
stringValue: latest
@@ -57,7 +63,7 @@ resourceSpans:
5763
stringValue: 6.10.14-linuxkit
5864
- key: process.pid
5965
value:
60-
intValue: "10"
66+
intValue: "11"
6167
- key: process.executable.name
6268
value:
6369
stringValue: node
@@ -72,7 +78,7 @@ resourceSpans:
7278
- stringValue: /index.js
7379
- key: process.runtime.version
7480
value:
75-
stringValue: 16.20.2
81+
stringValue: 18.20.8
7682
- key: process.runtime.name
7783
value:
7884
stringValue: nodejs
@@ -87,13 +93,13 @@ resourceSpans:
8793
stringValue: root
8894
- key: k8s.pod.ip
8995
value:
90-
stringValue: 10.244.0.37
96+
stringValue: 10.244.0.97
97+
- key: k8s.pod.uid
98+
value:
99+
stringValue: c505a1cc-bbd7-4c9c-9219-b1ed4f9d55e0
91100
- key: k8s.pod.labels.app
92101
value:
93102
stringValue: nodejs-test
94-
- key: k8s.pod.uid
95-
value:
96-
stringValue: 31d839ba-d43d-4dff-a30f-223240fcbcdd
97103
- key: container.image.name
98104
value:
99105
stringValue: quay.io/splunko11ytest/nodejs_test
@@ -102,7 +108,7 @@ resourceSpans:
102108
stringValue: latest
103109
- key: container.id
104110
value:
105-
stringValue: 5a57dd02a889bf84d157b6b7ea1de0aff0c6e184205e477f820f071d32d9ecc4
111+
stringValue: 0e1e6e83c3dfc52394eaeb11238605926f2c8a400fdf5adf474f55cf12182825
106112
- key: k8s.cluster.name
107113
value:
108114
stringValue: dev-operator
@@ -144,7 +150,7 @@ resourceSpans:
144150
stringValue: /
145151
- key: http.user_agent
146152
value:
147-
stringValue: curl/8.4.0
153+
stringValue: curl/8.12.1
148154
- key: http.flavor
149155
value:
150156
stringValue: "1.1"
@@ -162,21 +168,21 @@ resourceSpans:
162168
stringValue: 127.0.0.1
163169
- key: net.peer.port
164170
value:
165-
intValue: "43384"
171+
intValue: "58752"
166172
- key: http.status_code
167173
value:
168174
intValue: "200"
169175
- key: http.status_text
170176
value:
171177
stringValue: OK
172-
endTimeUnixNano: "1736397227751263458"
178+
endTimeUnixNano: "1745519445164209750"
173179
kind: 2
174180
name: GET
175181
parentSpanId: ""
176-
spanId: cecf7b647346aa16
177-
startTimeUnixNano: "1736397227751000000"
182+
spanId: 3b7d2b95766b3101
183+
startTimeUnixNano: "1745519445164000000"
178184
status: {}
179-
traceId: 7a867b8efaafebe61d4e773a8b1df2d9
185+
traceId: b4d0e7f301c4f386ec8c70b345b02b51
180186
- attributes:
181187
- key: http.url
182188
value:
@@ -198,7 +204,7 @@ resourceSpans:
198204
stringValue: /
199205
- key: http.user_agent
200206
value:
201-
stringValue: curl/8.4.0
207+
stringValue: curl/8.12.1
202208
- key: http.flavor
203209
value:
204210
stringValue: "1.1"
@@ -216,21 +222,21 @@ resourceSpans:
216222
stringValue: 127.0.0.1
217223
- key: net.peer.port
218224
value:
219-
intValue: "35724"
225+
intValue: "58762"
220226
- key: http.status_code
221227
value:
222228
intValue: "200"
223229
- key: http.status_text
224230
value:
225231
stringValue: OK
226-
endTimeUnixNano: "1736397228755263625"
232+
endTimeUnixNano: "1745519446168267375"
227233
kind: 2
228234
name: GET
229235
parentSpanId: ""
230-
spanId: 8828703c85d0b90d
231-
startTimeUnixNano: "1736397228755000000"
236+
spanId: 440071da4f90649c
237+
startTimeUnixNano: "1745519446168000000"
232238
status: {}
233-
traceId: ac9e67422b0de4041cf95b36bed24912
239+
traceId: 82bffb126182dd599e58b0fa4eabdd62
234240
- attributes:
235241
- key: http.url
236242
value:
@@ -252,7 +258,7 @@ resourceSpans:
252258
stringValue: /
253259
- key: http.user_agent
254260
value:
255-
stringValue: curl/8.4.0
261+
stringValue: curl/8.12.1
256262
- key: http.flavor
257263
value:
258264
stringValue: "1.1"
@@ -270,21 +276,21 @@ resourceSpans:
270276
stringValue: 127.0.0.1
271277
- key: net.peer.port
272278
value:
273-
intValue: "35738"
279+
intValue: "58778"
274280
- key: http.status_code
275281
value:
276282
intValue: "200"
277283
- key: http.status_text
278284
value:
279285
stringValue: OK
280-
endTimeUnixNano: "1736397229758311000"
286+
endTimeUnixNano: "1745519447175547250"
281287
kind: 2
282288
name: GET
283289
parentSpanId: ""
284-
spanId: 5a90bbf133b377af
285-
startTimeUnixNano: "1736397229758000000"
290+
spanId: a1a2eae2cbddf649
291+
startTimeUnixNano: "1745519447175000000"
286292
status: {}
287-
traceId: c8e82943d0e51c57d5c4bd9b8d7d9510
293+
traceId: aa33a78023cb68842e109d4f649df4d2
288294
- attributes:
289295
- key: http.url
290296
value:
@@ -306,7 +312,7 @@ resourceSpans:
306312
stringValue: /
307313
- key: http.user_agent
308314
value:
309-
stringValue: curl/8.4.0
315+
stringValue: curl/8.12.1
310316
- key: http.flavor
311317
value:
312318
stringValue: "1.1"
@@ -324,21 +330,21 @@ resourceSpans:
324330
stringValue: 127.0.0.1
325331
- key: net.peer.port
326332
value:
327-
intValue: "35748"
333+
intValue: "58792"
328334
- key: http.status_code
329335
value:
330336
intValue: "200"
331337
- key: http.status_text
332338
value:
333339
stringValue: OK
334-
endTimeUnixNano: "1736397230762353334"
340+
endTimeUnixNano: "1745519448184840417"
335341
kind: 2
336342
name: GET
337343
parentSpanId: ""
338-
spanId: 8f13b9afbbcb3b73
339-
startTimeUnixNano: "1736397230762000000"
344+
spanId: 9d0313aff3434415
345+
startTimeUnixNano: "1745519448184000000"
340346
status: {}
341-
traceId: d96d33dbdba6117257db5caa22ac4b5d
347+
traceId: c23ba158cce427fb8a152109f34b516b
342348
- attributes:
343349
- key: http.url
344350
value:
@@ -360,7 +366,7 @@ resourceSpans:
360366
stringValue: /
361367
- key: http.user_agent
362368
value:
363-
stringValue: curl/8.4.0
369+
stringValue: curl/8.12.1
364370
- key: http.flavor
365371
value:
366372
stringValue: "1.1"
@@ -378,18 +384,18 @@ resourceSpans:
378384
stringValue: 127.0.0.1
379385
- key: net.peer.port
380386
value:
381-
intValue: "35764"
387+
intValue: "58794"
382388
- key: http.status_code
383389
value:
384390
intValue: "200"
385391
- key: http.status_text
386392
value:
387393
stringValue: OK
388-
endTimeUnixNano: "1736397231769315042"
394+
endTimeUnixNano: "1745519449191330750"
389395
kind: 2
390396
name: GET
391397
parentSpanId: ""
392-
spanId: 0a6a4afead1c0b0b
393-
startTimeUnixNano: "1736397231769000000"
398+
spanId: 2f758eace4b2c271
399+
startTimeUnixNano: "1745519449191000000"
394400
status: {}
395-
traceId: 24a9f307fc2d8aeb2468d7f9384911c0
401+
traceId: 6e39414b41b40e23156c1034777f3e47

0 commit comments

Comments
 (0)