Skip to content

Add onSkip hook for middleware extractor returning null #8

@thedevyashsaini

Description

@thedevyashsaini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions