Fix - log record customization and update config file version#470
Merged
Conversation
…record customization
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes declarative-config customization so that a user-configured simple log record processor is treated as “already configured”, preventing the customizer from injecting the default batch log exporter. Also updates the example SDK config file format version and adds regression tests for exporter/reader override behavior across signals.
Changes:
- Treat
simplelog record processors as preconfigured inaddLogExporter, matching trace behavior. - Bump
sdk-config.yamlfile_formatto"1.0". - Add tests intended to ensure user-specified exporters/readers are not overridden for traces/logs/metrics.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sdk-config.yaml | Updates declarative config file_format to "1.0". |
| libs/shared/src/main/java/com/solarwinds/opentelemetry/extensions/config/provider/SharedConfigCustomizerProvider.java | Fixes log exporter injection guard to recognize both batch and simple processors. |
| libs/shared/src/test/java/com/solarwinds/opentelemetry/extensions/config/provider/SharedConfigCustomizerProviderTest.java | Adds tests for “don’t override user config” behavior for metrics/traces/logs. |
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.
Fix log record customization and update config file version
TLDR
Fixed a bug where user-specified simple log record processors were silently overwritten by the default batch exporter. Also bumped the declarative config file format version to
1.0and added tests covering exporter override behavior for all signal types.Details
Bug fix: simple log record processor detection
The
addLogExportermethod checks whether the user has already configured a log record processor before injecting the default batch exporter. Previously, it only checked forbatchprocessors:This meant users who configured a
simpleprocessor had their setup silently replaced. The analogous trace exporter method already handled both processor types. This change adds the missinggetSimple() != nullcheck to bring log handling into parity with trace handling.Config file version bump
Updated
file_formatfrom"0.4"to"1.0"to align with the current OTel declarative configuration schema version.New tests
Added tests verifying that user-specified exporters are not overwritten for:
Test services data