Skip to content

[chore] test metrics and profiling with auto-instrumentation#2329

Merged
jinja2 merged 4 commits intomainfrom
add-metric-prof-ins
Mar 30, 2026
Merged

[chore] test metrics and profiling with auto-instrumentation#2329
jinja2 merged 4 commits intomainfrom
add-metric-prof-ins

Conversation

@jinja2
Copy link
Copy Markdown
Collaborator

@jinja2 jinja2 commented Mar 27, 2026

Description:

Add functional test coverage for auto-instrumentation metrics and profiling across
all Splunk-supported languages (Java, .NET, Node.js, Python).

Changes:

  • New auto_instrumentation_test.go with per-language metrics and profiling subtests,
    matched by telemetry.sdk.language + service.name
  • Refactored shared helpers out of functional_test.go
  • Python and Node.js test app Dockerfiles changed from Alpine to Slim: auto-instrumentation images have native extensions compiled against glibc (e.g. psutil/grpcio for Python, the C++ profiling addon for Node.js) and I couldn't runtime metrics for Python and profiling data for nodejs to work with the our Alpine (musl libc).
  • Makefile + CI build these images locally and load into Kind via kind load docker-image (TODO - push these updated images to quay)
  • Added SPLUNK_METRICS_ENABLED to node instrumentation config in test values. Without this var, no metrics are exported from Node.js.

@jinja2 jinja2 force-pushed the add-metric-prof-ins branch from 9314f11 to ec80e19 Compare March 27, 2026 18:01
Comment on lines +99 to +100
- name: SPLUNK_METRICS_ENABLED
value: "true"
Copy link
Copy Markdown
Collaborator Author

@jinja2 jinja2 Mar 27, 2026

Choose a reason for hiding this comment

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

Without this var, no metrics are exported from Node.js. Only set in the test values for now, but will check with product about whether this deviation from other languages default behavior is expected.

@jinja2 jinja2 marked this pull request as ready for review March 27, 2026 23:51
@jinja2 jinja2 requested review from a team as code owners March 27, 2026 23:51
Copilot AI review requested due to automatic review settings March 27, 2026 23:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds functional test coverage to validate Splunk auto-instrumentation emits expected runtime metrics and profiling signals across supported languages, and updates the kind/CI flow to build compatible test-app images locally.

Changes:

  • Added per-language functional subtests for auto-instrumentation metrics and profiling, matched by telemetry.sdk.language + service.name.
  • Refactored/moved auto-instrumentation trace test helpers into a dedicated test file and updated shared metric-check helpers.
  • Switched Python/Node.js test app images from Alpine → Slim and added Makefile/CI steps to build + kind load these images.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
functional_tests/functional/testdata/values/test_values.yaml.tmpl Enables profiling in test values and overrides nodejs metrics env + adds o11y HEC exporter endpoint for profiling.
functional_tests/functional/testdata/python/Dockerfile Moves Python test app base image to python:3.13-slim and updates package install/pip flags.
functional_tests/functional/testdata/nodejs/Dockerfile Moves Node.js test app base image to node:18-slim and updates package install commands.
functional_tests/functional/functional_test.go Adds new local-cluster subtests for metrics/profiling and refactors metric assertion helpers.
functional_tests/functional/auto_instrumentation_test.go New file containing auto-instrumentation trace tests plus new metrics/profiling validations.
Makefile Adds kind-build-test-images and wires it into functionaltest-local.
.github/workflows/functional_test_v2.yaml Builds + loads the updated test images into kind before running functional tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jinja2 jinja2 force-pushed the add-metric-prof-ins branch from 9a18faa to b0eb4a2 Compare March 28, 2026 00:06
Copilot AI review requested due to automatic review settings March 28, 2026 03:17
@jinja2 jinja2 force-pushed the add-metric-prof-ins branch from b0eb4a2 to 62d4e25 Compare March 28, 2026 03:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jinja2 jinja2 merged commit e57a0e9 into main Mar 30, 2026
160 of 162 checks passed
@jinja2 jinja2 deleted the add-metric-prof-ins branch March 30, 2026 19:11
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants