Context The extractor can return null to skip tracking, but the only visibility is a log line. Add a hook so apps can track skip reasons.
Goal Expose an optional onSkip callback that is called when extractor returns null.
Acceptance Criteria
middlewareEventConsumer config accepts optional onSkip.
onSkip is called with { req, reason?: string } when extractor returns null.
- Default behavior unchanged (still skips tracking silently if callback not provided).
Notes
- Reason can be a short string like
"extractor_returned_null" or based on caller-provided value.
Context The extractor can return
nullto skip tracking, but the only visibility is a log line. Add a hook so apps can track skip reasons.Goal Expose an optional
onSkipcallback that is called when extractor returnsnull.Acceptance Criteria
middlewareEventConsumerconfig accepts optionalonSkip.onSkipis called with{ req, reason?: string }when extractor returnsnull.Notes
"extractor_returned_null" or based on caller-provided value.