Skip to content

opentelemetry-exporter-otlp-json-file: add OTLP JSON file Docker tests#5412

Open
herin049 wants to merge 8 commits into
open-telemetry:mainfrom
herin049:feat/otlp-file-docker-tests
Open

opentelemetry-exporter-otlp-json-file: add OTLP JSON file Docker tests#5412
herin049 wants to merge 8 commits into
open-telemetry:mainfrom
herin049:feat/otlp-file-docker-tests

Conversation

@herin049

@herin049 herin049 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Add Docker based integration tests for the OTLP JSON File exporter.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

uv run tox -e docker-tests-otlpexporter

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@herin049
herin049 marked this pull request as ready for review July 15, 2026 03:04
@herin049
herin049 requested a review from a team as a code owner July 15, 2026 03:04
@herin049
herin049 requested a review from Copilot July 15, 2026 03:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Docker-based coverage for the opentelemetry-exporter-otlp-json-file exporter by running an OpenTelemetry Collector Contrib instance configured with the otlp_json_file receiver and validating that traces/metrics/logs emitted by file exporters are received by the existing OTLP test server.

Changes:

  • Extend the docker-tests-otlpexporter tox env to install the OTLP JSON proto + JSON exporter packages and prepare the bind-mounted file output directories.
  • Add “file” variants to the existing OTLP traces/metrics/logs functional test matrices using FileSpanExporter, FileMetricExporter, and FileLogExporter.
  • Update the Docker test collector setup (compose + config) to read *.jsonl from a host-mounted directory via otlp_json_file/* receivers.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tox.ini Installs JSON OTLP packages for docker tests and prepares on-host directories used by the file exporter + collector tailing.
tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_traces_functional.py Adds FileSpanExporter to the functional test parameter set using a per-run .jsonl path.
tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_metrics_functional.py Adds FileMetricExporter to the functional test parameter set using a per-run .jsonl path.
tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_logs_functional.py Adds FileLogExporter to the functional test parameter set using a per-run .jsonl path.
tests/opentelemetry-docker-tests/tests/otlpexporter/conftest.py Adds a session autouse cleanup fixture for stale .jsonl artifacts under the mounted directory.
tests/opentelemetry-docker-tests/tests/otlpexporter/__init__.py Adds OTLP_FILE_DATA_DIR, lazy exporter kwargs support, and a helper to generate unique .jsonl file paths.
tests/opentelemetry-docker-tests/tests/docker-compose.yml Switches to Collector Contrib image and bind-mounts the file exporter output directory into the collector.
tests/opentelemetry-docker-tests/tests/collector-config.yaml Adds otlp_json_file/* receivers and includes them in each signal pipeline.
tests/opentelemetry-docker-tests/tests/.gitignore Ignores the runtime-created file-output directory in docker tests.
.changelog/5412.added Changelog entry for adding Docker tests for the OTLP JSON file exporter.

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

Comment thread tox.ini
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.

2 participants