Skip to content

test(docker-tests): add end-to-end test for file-based declarative configuration#5362

Open
ArjunPakhan wants to merge 1 commit into
open-telemetry:mainfrom
ArjunPakhan:feat/otel-config-docker-test
Open

test(docker-tests): add end-to-end test for file-based declarative configuration#5362
ArjunPakhan wants to merge 1 commit into
open-telemetry:mainfrom
ArjunPakhan:feat/otel-config-docker-test

Conversation

@ArjunPakhan

Copy link
Copy Markdown

Description

This PR introduces a dedicated end-to-end integration test (test_otel_config_file_e2e) within the Docker test suite to validate the SDK's file-based declarative configuration mechanism.

It ensures that configuring the SDK via the OTEL_CONFIG_FILE environment variable successfully reads, parses, and validates structural schemas against a configuration file (minimal_config.yaml), loads the underlying protocol bindings dynamically, and initializes a functional tracing pipeline.

Changes

  • Added tests/opentelemetry-docker-tests/tests/declarative_config/minimal_config.yaml with valid file schema settings mapping to a local OTLP gRPC endpoint.
  • Added tests/opentelemetry-docker-tests/tests/declarative_config/test_otel_config_file.py to assert correct SDK instantiation and baseline resource attribution mapping.
  • Incorporated explicit provider.shutdown() lifecycle flushing to guarantee background span batches dispatch successfully across network boundaries within rapid test loops.

Testing Strategy

Verified locally inside the docker-test virtual environment against a live running otel-collector container instance:

pytest -s declarative_config/

@ArjunPakhan ArjunPakhan requested a review from a team as a code owner June 26, 2026 14:41
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 26, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ArjunPakhan / name: Arjun Pakhan (0c47bd7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant