Skip to content

Conversation

@ishaish103
Copy link

Link to tracking issue

Fixes #10472

@ishaish103 ishaish103 requested review from a team and andrzej-stencel as code owners November 15, 2025 03:01
@github-actions github-actions bot added the exporter/debug Issues related to the Debug exporter label Nov 15, 2025
@andrzej-stencel andrzej-stencel changed the title [chore] add ability to set output_paths [exporter/debug] add ability to set output_paths Nov 17, 2025
Copy link
Member

@andrzej-stencel andrzej-stencel left a 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
}(),
},
{
Copy link
Member

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?

Copy link
Author

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

@ishaish103
Copy link
Author

@andrzej-stencel Hey :)
ive updated the code, can you please review?

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (b31ddb9) to head (be1255f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 3, 2025

CodSpeed Performance Report

Merging #14164 will not alter performance

Comparing ishaish103:10472-debug-exporter-output-paths-ishai (be1255f) with main (b31ddb9)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 59 untouched
⏩ 20 skipped1

Footnotes

  1. 20 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

- 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
@ishaish103 ishaish103 requested a review from mx-psi as a code owner December 3, 2025 17:43
- 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.
@github-actions github-actions bot added the release:risky-change This change may affect the release label Dec 3, 2025
Copy link
Member

@andrzej-stencel andrzej-stencel left a 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: false

now fails:

Error: invalid configuration: exporters::debug: output_paths must be specified and non-empty when use_internal_logger is false

@ishaish103
Copy link
Author

default, this config

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:
` debug:

`
so i ended up removing this validation and added comment on the config param that in such case the output path will be ignored

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

Labels

exporter/debug Issues related to the Debug exporter release:risky-change This change may affect the release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[exporter/debug] make the output stream configurable when use_internal_logger is false

2 participants