Skip to content

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

Open
morteza-asadi wants to merge 1 commit intostevejgordon:mainfrom
morteza-asadi:feature/endpoint-exclusion-option
Open

Add support for excluding specific paths from correlation ID processing#120
morteza-asadi wants to merge 1 commit intostevejgordon:mainfrom
morteza-asadi:feature/endpoint-exclusion-option

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