Skip to content

Conversation

@agrognetti
Copy link
Contributor

@agrognetti agrognetti commented Nov 10, 2025

Summary

To avoid buffering logs that should be discarded due to the sampling config, the stop sampling logs in the exporter to do it in the processors.
"Conditional logic" refers to the logic that was inside the ConditionLogRecordExporter (Used to allow different filtering rules for crashes vs normal logs)

How did you test this change?

Unit tests

Are there any deployment considerations?

No


Note

Replaces exporter-based log sampling and crash/normal filtering with processor-based equivalents and updates the log pipeline and tests accordingly.

  • Logs pipeline:
    • Introduces ConditionalLogRecordProcessor to filter crash (io.opentelemetry.crash) vs normal logs.
    • Introduces SamplingLogProcessor to apply sampling before downstream processing.
    • Removes exporter wrappers ConditionalLogRecordExporter and SamplingLogExporter.
    • Updates InstrumentationManager.createLoggerProcessor to chain SamplingLogProcessorConditionalLogRecordProcessorRoutingLogRecordProcessor, and simplifies createLogExporter to only build a composite in debug mode.
  • Tests:
    • Adds unit tests for ConditionalLogRecordProcessor and SamplingLogProcessor.
    • Removes tests for deleted exporter classes.

Written by Cursor Bugbot for commit 2067fb3. This will update automatically on new commits. Configure here.

…rs to processors

- "Conditional logic" refers to the logic that was inside the ConditionLogRecordExporter (Used to allow different filtering rules for crashes vs normal logs)
@agrognetti agrognetti merged commit e4a4cdc into main Nov 12, 2025
23 checks passed
@agrognetti agrognetti deleted the agrognetti/O11Y-630 branch November 12, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants