Skip to content

chore: OpenTelemetry integration test validating resource attributes#4459

Open
richard-salac wants to merge 13 commits intov3.x.xfrom
reboot/otel-golden-test-compose
Open

chore: OpenTelemetry integration test validating resource attributes#4459
richard-salac wants to merge 13 commits intov3.x.xfrom
reboot/otel-golden-test-compose

Conversation

@richard-salac
Copy link
Contributor

@richard-salac richard-salac commented Jan 20, 2026

Description

The Service Registration test was enhanced to run APIML Modulith with OpenTelemetry and validates the produced telemetry data contains correct values for the resource attributes, so the OpenTelemetry configuration is propagated correctly.

The validation uses docker images with OpenTelemetry Collector and Golden Tester, check the README.md.

Linked to # (issue)
Part of the # (epic)

Type of change

  • feat: New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

… to create a route for itself

Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Comment on lines 9 to 43
"--otlp-http-endpoint", "0.0.0.0:4318",
"--otlp-endpoint", "0.0.0.0:4317",
"--ignore-timestamp",
"--ignore-start-timestamp",
"--timeout", "3m",
"--ignore-resource-attribute-value", "service.instance.id",
"--ignore-resource-attribute-value", "host.name",
"--ignore-resource-attribute-value", "host.arch",
"--ignore-resource-attribute-value", "process.pid",
"--ignore-resource-attribute-value", "process.command_line",
"--ignore-resource-attribute-value", "process.command_args",
"--ignore-resource-attribute-value", "process.executable.path",
"--ignore-resource-attribute-value", "process.runtime.description",
"--ignore-resource-attribute-value", "process.runtime.version",
"--ignore-resource-attribute-value", "process.runtime.name",
"--ignore-resource-attribute-value", "os.description",
"--ignore-resource-attribute-value", "os.type",
"--ignore-resource-attribute-value", "telemetry.sdk.version",
"--ignore-resource-attribute-value", "telemetry.distro.name",
"--ignore-resource-attribute-value", "telemetry.distro.version",
"--ignore-resource-attribute-value", "telemetry.sdk.language",
"--ignore-resource-attribute-value", "telemetry.sdk.name",
"--ignore-resource-attribute-value", "service.version",
"--ignore-resource-attribute-value", "service.name",
"--ignore-metric-attribute-value", "service.instance.id",
"--ignore-metric-attribute-value", "service.version",
"--ignore-metric-attribute-value", "service.name",
"--ignore-resource-metrics-order",
"--ignore-scope-metrics-order",
"--ignore-metrics-order",
"--ignore-metrics-data-points-order",
"--ignore-metric-values",
"--ignore-data-points-attributes-order",
"--ignore-scope-version",
"--expected", "/var/data/expected.yaml",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it needs an extra indent, the YAML appears with format issues in my IDE

ZWE_configs_apiml_security_authorization_provider: endpoint
# set the value to "authentication" if you want to test the sticky session load balancing
APIML_SERVICE_CUSTOMMETADATA_APIML_LB_TYPE: headerRequest
OTEL_SDK_DISABLED: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this enabling it for all integration tests?

--retry-delay 2 \
--retry 10
echo ""
echo "curl exit code: "$?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this exit code will be the one from the previous echo, not curl

--retry-delay 2 \
--retry 10
echo ""
echo "curl exit code: "$?
Copy link
Contributor

Choose a reason for hiding this comment

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

same about exit code

docker stop collector -t 60

echo "Collector container logs:"
docker logs collector
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it save it as a file to be picked up by the Store results otel/** filter?

@richard-salac richard-salac force-pushed the reboot/otel-golden-test-compose branch 11 times, most recently from e6ab157 to e88917c Compare January 22, 2026 15:30
@richard-salac richard-salac force-pushed the reboot/otel-golden-test-compose branch 2 times, most recently from 22bbbd5 to ddd5ed4 Compare January 23, 2026 09:17
@richard-salac richard-salac force-pushed the reboot/otel-golden-test-compose branch 2 times, most recently from 392a024 to f8167a5 Compare January 23, 2026 09:48
achmelo and others added 2 commits January 23, 2026 11:28
Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Signed-off-by: Richard Salac <richard.salac@broadcom.com>
@richard-salac richard-salac force-pushed the reboot/otel-golden-test-compose branch from f8167a5 to 02faf4b Compare January 23, 2026 10:28
@sonarqubecloud
Copy link

Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Signed-off-by: Richard Salač <richard.salac@broadcom.com>
Signed-off-by: Richard Salač <richard.salac@broadcom.com>
Signed-off-by: Richard Salac <richard.salac@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants