Skip to content

Upgrade NodeJS instrumentation to v3.1.2 #1800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .chloggen/update-nodejs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: operator
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Bump nodejs to v3.1.2 in helm-charts/splunk-otel-collector/values.yaml
# One or more tracking issues related to the change
issues: [1800]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
6 changes: 6 additions & 0 deletions .github/workflows/functional_test_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ jobs:
- name: Update dependencies
run: |
make dep-update
- name: Temporary generate new nodejs image - do not upload it
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently these images a pushed to quay.io in a separate step. This specific image is not that expensive to build, but, to facilitate upgrades that require changes to the test images we may want to consider saving the needed images as workflow artifacts instead of publishing them to quay.io

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might help. That can be tracked separately.

working-directory: functional_tests/functional/testdata/nodejs
run: docker buildx build --file Dockerfile --tag quay.io/splunko11ytest/nodejs_test:latest .
- name: Temporary update nodejs image to be used by kind
working-directory: functional_tests
run: kind load docker-image quay.io/splunko11ytest/nodejs_test:latest --name kind
- name: run functional tests
id: run-functional-tests
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ spec:
- name: OTEL_RESOURCE_ATTRIBUTES
value: splunk.zc.method=autoinstrumentation-apache-httpd:1.0.4
nodejs:
image: ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v2.15.0
image: ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.1.2
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: splunk.zc.method=splunk-otel-js:v2.15.0
value: splunk.zc.method=splunk-otel-js:v3.1.2
# nodejs auto-instrumentation uses http/proto by default, so data must be sent to 4318 instead of 4317.
# See: https://github.com/open-telemetry/opentelemetry-operator#opentelemetry-auto-instrumentation-injection
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://default-splunk-otel-collector-agent.default.svc.cluster.local:4318
python:
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.51b0
env:
Expand Down
4 changes: 2 additions & 2 deletions functional_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export KUBE_TEST_ENV=kind
export K8S_VERSION=v1.29.0
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
kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve
make cert-manager
make dep-update
kind load docker-image quay.io/splunko11ytest/nodejs_test:latest --name kind
kind load docker-image quay.io/splunko11ytest/java_test:latest --name kind
kind load docker-image quay.io/splunko11ytest/dotnet_test:latest --name kind
# On Mac M1s, you can also push this image so kind doesn't get confused with the platform to use:
kind load docker-image ghcr.io/signalfx/splunk-otel-dotnet/splunk-otel-dotnet:v1.8.0 --name kind
kind load docker-image ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v2.4.4 --name kind
kind load docker-image ghcr.io/signalfx/splunk-otel-js/splunk-otel-js:v3.1.2 --name kind
kind load docker-image ghcr.io/signalfx/splunk-otel-java/splunk-otel-java:v1.30.0 --name kind
kind load docker-image ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.50b0 --name kind
```
Expand Down
2 changes: 2 additions & 0 deletions functional_tests/functional/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func deployChartsAndApps(t *testing.T, testKubeConfig string) {
"LogHecEndpoint": fmt.Sprintf("http://%s:%d", hostEp, internal.HECLogsReceiverPort),
"MetricHecEndpoint": fmt.Sprintf("http://%s:%d/services/collector", hostEp, internal.HECMetricsReceiverPort),
"OtlpEndpoint": fmt.Sprintf("%s:%d", hostEp, internal.OTLPGRPCReceiverPort),
"OtlpHttpEndpoint": fmt.Sprintf("%s:%d", hostEp, internal.OTLPHTTPReceiverPort),
"ApiURLEndpoint": fmt.Sprintf("http://%s:%d", hostEp, internal.SignalFxAPIPort),
"LogObjectsHecEndpoint": fmt.Sprintf("http://%s:%d/services/collector", hostEp, internal.HECObjectsReceiverPort),
"KubeTestEnv": kubeTestEnv,
Expand Down Expand Up @@ -557,6 +558,7 @@ func testNodeJSTraces(t *testing.T) {
ptracetest.IgnoreEndTimestamp(),
ptracetest.IgnoreResourceSpansOrder(),
ptracetest.IgnoreScopeSpansOrder(),
ptracetest.IgnoreScopeSpanInstrumentationScopeVersion(),
)
if err != nil && os.Getenv("UPDATE_EXPECTED_RESULTS") == "true" {
internal.WriteNewExpectedTracesResult(t, expectedTracesFile, selectedTrace)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ resourceSpans:
stringValue: opentelemetry
- key: telemetry.sdk.version
value:
stringValue: 1.28.0
- key: splunk.distro.version
stringValue: 1.30.0
- key: telemetry.distro.name
value:
stringValue: 2.15.0
stringValue: splunk-nodejs
- key: telemetry.distro.version
value:
stringValue: 3.1.2
- key: splunk.zc.method
value:
stringValue: splunk-otel-js:v2.15.0
stringValue: splunk-otel-js:v3.1.2
- key: k8s.container.name
value:
stringValue: nodejs-test
Expand All @@ -33,13 +36,16 @@ resourceSpans:
stringValue: kind-control-plane
- key: k8s.pod.name
value:
stringValue: nodejs-test-56b74df9ff-pzbkl
stringValue: nodejs-test-5fbcbff576-k9trt
- key: k8s.replicaset.name
value:
stringValue: nodejs-test-56b74df9ff
stringValue: nodejs-test-5fbcbff576
- key: service.instance.id
value:
stringValue: default.nodejs-test-56b74df9ff-pzbkl.nodejs-test
stringValue: default.nodejs-test-5fbcbff576-k9trt.nodejs-test
- key: service.namespace
value:
stringValue: default
- key: service.version
value:
stringValue: latest
Expand All @@ -57,7 +63,7 @@ resourceSpans:
stringValue: 6.10.14-linuxkit
- key: process.pid
value:
intValue: "10"
intValue: "11"
- key: process.executable.name
value:
stringValue: node
Expand All @@ -72,7 +78,7 @@ resourceSpans:
- stringValue: /index.js
- key: process.runtime.version
value:
stringValue: 16.20.2
stringValue: 18.20.8
- key: process.runtime.name
value:
stringValue: nodejs
Expand All @@ -87,13 +93,13 @@ resourceSpans:
stringValue: root
- key: k8s.pod.ip
value:
stringValue: 10.244.0.37
stringValue: 10.244.0.97
- key: k8s.pod.uid
value:
stringValue: c505a1cc-bbd7-4c9c-9219-b1ed4f9d55e0
- key: k8s.pod.labels.app
value:
stringValue: nodejs-test
- key: k8s.pod.uid
value:
stringValue: 31d839ba-d43d-4dff-a30f-223240fcbcdd
- key: container.image.name
value:
stringValue: quay.io/splunko11ytest/nodejs_test
Expand All @@ -102,7 +108,7 @@ resourceSpans:
stringValue: latest
- key: container.id
value:
stringValue: 5a57dd02a889bf84d157b6b7ea1de0aff0c6e184205e477f820f071d32d9ecc4
stringValue: 0e1e6e83c3dfc52394eaeb11238605926f2c8a400fdf5adf474f55cf12182825
- key: k8s.cluster.name
value:
stringValue: dev-operator
Expand Down Expand Up @@ -144,7 +150,7 @@ resourceSpans:
stringValue: /
- key: http.user_agent
value:
stringValue: curl/8.4.0
stringValue: curl/8.12.1
- key: http.flavor
value:
stringValue: "1.1"
Expand All @@ -162,21 +168,21 @@ resourceSpans:
stringValue: 127.0.0.1
- key: net.peer.port
value:
intValue: "43384"
intValue: "58752"
- key: http.status_code
value:
intValue: "200"
- key: http.status_text
value:
stringValue: OK
endTimeUnixNano: "1736397227751263458"
endTimeUnixNano: "1745519445164209750"
kind: 2
name: GET
parentSpanId: ""
spanId: cecf7b647346aa16
startTimeUnixNano: "1736397227751000000"
spanId: 3b7d2b95766b3101
startTimeUnixNano: "1745519445164000000"
status: {}
traceId: 7a867b8efaafebe61d4e773a8b1df2d9
traceId: b4d0e7f301c4f386ec8c70b345b02b51
- attributes:
- key: http.url
value:
Expand All @@ -198,7 +204,7 @@ resourceSpans:
stringValue: /
- key: http.user_agent
value:
stringValue: curl/8.4.0
stringValue: curl/8.12.1
- key: http.flavor
value:
stringValue: "1.1"
Expand All @@ -216,21 +222,21 @@ resourceSpans:
stringValue: 127.0.0.1
- key: net.peer.port
value:
intValue: "35724"
intValue: "58762"
- key: http.status_code
value:
intValue: "200"
- key: http.status_text
value:
stringValue: OK
endTimeUnixNano: "1736397228755263625"
endTimeUnixNano: "1745519446168267375"
kind: 2
name: GET
parentSpanId: ""
spanId: 8828703c85d0b90d
startTimeUnixNano: "1736397228755000000"
spanId: 440071da4f90649c
startTimeUnixNano: "1745519446168000000"
status: {}
traceId: ac9e67422b0de4041cf95b36bed24912
traceId: 82bffb126182dd599e58b0fa4eabdd62
- attributes:
- key: http.url
value:
Expand All @@ -252,7 +258,7 @@ resourceSpans:
stringValue: /
- key: http.user_agent
value:
stringValue: curl/8.4.0
stringValue: curl/8.12.1
- key: http.flavor
value:
stringValue: "1.1"
Expand All @@ -270,21 +276,21 @@ resourceSpans:
stringValue: 127.0.0.1
- key: net.peer.port
value:
intValue: "35738"
intValue: "58778"
- key: http.status_code
value:
intValue: "200"
- key: http.status_text
value:
stringValue: OK
endTimeUnixNano: "1736397229758311000"
endTimeUnixNano: "1745519447175547250"
kind: 2
name: GET
parentSpanId: ""
spanId: 5a90bbf133b377af
startTimeUnixNano: "1736397229758000000"
spanId: a1a2eae2cbddf649
startTimeUnixNano: "1745519447175000000"
status: {}
traceId: c8e82943d0e51c57d5c4bd9b8d7d9510
traceId: aa33a78023cb68842e109d4f649df4d2
- attributes:
- key: http.url
value:
Expand All @@ -306,7 +312,7 @@ resourceSpans:
stringValue: /
- key: http.user_agent
value:
stringValue: curl/8.4.0
stringValue: curl/8.12.1
- key: http.flavor
value:
stringValue: "1.1"
Expand All @@ -324,21 +330,21 @@ resourceSpans:
stringValue: 127.0.0.1
- key: net.peer.port
value:
intValue: "35748"
intValue: "58792"
- key: http.status_code
value:
intValue: "200"
- key: http.status_text
value:
stringValue: OK
endTimeUnixNano: "1736397230762353334"
endTimeUnixNano: "1745519448184840417"
kind: 2
name: GET
parentSpanId: ""
spanId: 8f13b9afbbcb3b73
startTimeUnixNano: "1736397230762000000"
spanId: 9d0313aff3434415
startTimeUnixNano: "1745519448184000000"
status: {}
traceId: d96d33dbdba6117257db5caa22ac4b5d
traceId: c23ba158cce427fb8a152109f34b516b
- attributes:
- key: http.url
value:
Expand All @@ -360,7 +366,7 @@ resourceSpans:
stringValue: /
- key: http.user_agent
value:
stringValue: curl/8.4.0
stringValue: curl/8.12.1
- key: http.flavor
value:
stringValue: "1.1"
Expand All @@ -378,18 +384,18 @@ resourceSpans:
stringValue: 127.0.0.1
- key: net.peer.port
value:
intValue: "35764"
intValue: "58794"
- key: http.status_code
value:
intValue: "200"
- key: http.status_text
value:
stringValue: OK
endTimeUnixNano: "1736397231769315042"
endTimeUnixNano: "1745519449191330750"
kind: 2
name: GET
parentSpanId: ""
spanId: 0a6a4afead1c0b0b
startTimeUnixNano: "1736397231769000000"
spanId: 2f758eace4b2c271
startTimeUnixNano: "1745519449191000000"
status: {}
traceId: 24a9f307fc2d8aeb2468d7f9384911c0
traceId: 6e39414b41b40e23156c1034777f3e47
Loading
Loading