-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[exporter/debug] add ability to set output_paths #14164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[exporter/debug] add ability to set output_paths #14164
Conversation
andrzej-stencel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @ishaish103! I added a couple suggestions for the docs and the tests.
| return cfg | ||
| }(), | ||
| }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case for when user sets output_paths but does not set use_internal_logger to false.
What should happen then? Shouldn't such config be invalid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically the same thing:
throw an error if out_paths is null and set_intenral_logger is false
Co-authored-by: Andrzej Stencel <[email protected]>
|
@andrzej-stencel Hey :) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14164 +/- ##
==========================================
- Coverage 92.15% 92.14% -0.01%
==========================================
Files 668 668
Lines 41517 41520 +3
==========================================
+ Hits 38258 38260 +2
- Misses 2221 2222 +1
Partials 1038 1038 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…tor into 10472-debug-exporter-output-paths-ishai
…ishaish103/opentelemetry-collector into 10472-debug-exporter-output-paths-ishai
CodSpeed Performance ReportMerging #14164 will not alter performanceComparing
|
- Add validation to error when output_paths is specified but use_internal_logger is true - Remove redundant fallback in createCustomLogger since validation ensures output_paths is set - Update default config to have empty OutputPaths when UseInternalLogger is true - Update tests to reflect the new validation rules
- Updated QueueConfig to use configoptional.Optional[QueueBatchConfig] - Changed from queueCfg.Enabled = false to configoptional.None() to disable queue - Updated all test cases to use the new Optional API - Preserved OutputPaths feature and validation logic
- Remove trailing whitespace in factory_test.go - Remove extra blank line in factory_test.go - Regenerate all generated code files
- Add Makefile with fmt and generate targets to prevent make errors - Update generated test files in debugexporter
- Replace fmt.Errorf with errors.New for simple error messages (perfsprint) - Replace assert with require for error assertions (testifylint)
- Avoid calling t.TempDir() in test case definitions - Create temp directories once per test run - Add runtime.GC() and small delay on Windows to ensure file handles are released - Fixes test failures on Windows where log files remain open during cleanup
The local module is for local testing only and has dependency issues. Exclude it from ALL_MODULES to prevent test failures in CI.
andrzej-stencel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the output_paths is empty by default, this configuration:
exporters:
debug:
use_internal_logger: falsenow fails:
Error: invalid configuration: exporters::debug: output_paths must be specified and non-empty when use_internal_logger is false…ishaish103/opentelemetry-collector into 10472-debug-exporter-output-paths-ishai
ive added default output paths to the defaultConfig but then it created a situation that UseInternalLogger is true by default (that was the value before) and output_path is set, which triggered validation error when running empty config: ` |
Link to tracking issue
Fixes #10472