Skip to content
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

Add support for excluding specific paths from correlation ID processing #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

morteza-asadi
Copy link

Add support for excluding paths from correlation ID processing

This commit introduces the ability to specify paths that should be excluded from correlation ID processing within the CorrelationId middleware. This feature allows users to configure the middleware to skip applying correlation IDs to requests that match defined patterns, which is particularly useful for health checks and other system routes that do not require tracking.

Changes include:

  • Updated CorrelationIdOptions to include ExcludedPaths list.
  • Modified CorrelationIdMiddleware to check and skip processing for paths listed in ExcludedPaths.
  • Added unit tests to verify that the middleware correctly skips processing for excluded paths and continues to function for non-excluded paths.

@morteza-asadi
Copy link
Author

morteza-asadi commented Apr 26, 2024

@stevejgordon
Could you please review the changes when you have some time? Your feedback would be invaluable.
@NRKirby @tdabasinskas @maldworth

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.

1 participant