opentelemetry-sdk: add support for file exporter with declarative config#5311
Open
herin049 wants to merge 4 commits into
Open
opentelemetry-sdk: add support for file exporter with declarative config#5311herin049 wants to merge 4 commits into
herin049 wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the opentelemetry-sdk declarative configuration pipeline to support the experimental OTLP JSON Lines file exporter for traces, metrics, and logs by wiring new factory functions into the existing exporter registries and adding output_stream parsing/validation.
Changes:
- Add
otlp_file_developmentexporter factories for spans, metrics, and logs (with helpful “missing package”ConfigurationErrors). - Introduce
_parse_otlp_file_output_stream()and corresponding unit tests forstdout,file://...URIs, and invalid schemes/inputs. - Add changelog entry for the new declarative-config capability.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| opentelemetry-sdk/src/opentelemetry/sdk/_configuration/_common.py | Adds output_stream parsing helper used by file exporters. |
| opentelemetry-sdk/src/opentelemetry/sdk/_configuration/_tracer_provider.py | Registers and constructs OTLP JSON file span exporter via declarative config. |
| opentelemetry-sdk/src/opentelemetry/sdk/_configuration/_meter_provider.py | Registers and constructs OTLP JSON file metric exporter via declarative config. |
| opentelemetry-sdk/src/opentelemetry/sdk/_configuration/_logger_provider.py | Registers and constructs OTLP JSON file log exporter via declarative config. |
| opentelemetry-sdk/tests/_configuration/test_common.py | Adds tests for _parse_otlp_file_output_stream(). |
| opentelemetry-sdk/tests/_configuration/test_tracer_provider.py | Adds trace pipeline tests for otlp_file_development exporter behavior. |
| opentelemetry-sdk/tests/_configuration/test_meter_provider.py | Adds metric pipeline tests for otlp_file_development exporter behavior. |
| opentelemetry-sdk/tests/_configuration/test_logger_provider.py | Adds log pipeline tests for otlp_file_development exporter behavior. |
| .changelog/5311.added | Changelog entry for the new feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for the newly added OTLP JSON File exporter to declarative config.
Refs #3631
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: