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

[BUG] correlationHeaderExcludePatterns is not honored in Ajax calls #1528

Closed
jpfifer opened this issue Apr 9, 2021 · 4 comments
Closed

[BUG] correlationHeaderExcludePatterns is not honored in Ajax calls #1528

jpfifer opened this issue Apr 9, 2021 · 4 comments
Assignees
Milestone

Comments

@jpfifer
Copy link

jpfifer commented Apr 9, 2021

Description/Screenshot

The value of correlationHeaderExcludePatterns in Snippet is not honored by the SDK.

It appears that the getDefaultConfig() in AjaxMonitor doesn't include an empty value for correlationHeaderExcludePatterns. This causes the configuration loading to never see the configuration.

Steps to Reproduce

  1. Set correlationHeaderExcludePatterns to [/.*/]
    This should cause no correlation headers to be sent at all
  2. Run the application and verify that the correlation headers are being sent.
  • OS/Browser: macOS Chrome and Firefox
  • SDK Version [e.g. 22]: 2.5.10 and 2.6.1
  • How you initialized the SDK:
config: {
        instrumentationKey,
        extensions: [reactPlugin],
        extensionConfig: {
          [reactPlugin.identifier]: { history }
        },
        disableFetchTracking: false,
        enableCorsCorrelation: true,
        disableAjaxTracking: false,
        enableRequestHeaderTracking: true,
        enableResponseHeaderTracking: true,
        correlationHeaderExcludedDomains: [`...`],
        correlationHeaderExcludePatterns: [new RegExp('...')],
        distributedTracingMode: DistributedTracingModes.AI
      }

Expected behavior
Correlation headers should not be sent when the URI matches the exclude pattern

@MSNev
Copy link
Collaborator

MSNev commented Apr 15, 2021

I think this is related to #1524

@jpfifer
Copy link
Author

jpfifer commented Apr 27, 2021

I just upgraded to the current version and it correlationHeaderExcludePatterns appears to be working correctly.

@MSNev
Copy link
Collaborator

MSNev commented Apr 27, 2021

v2.6.2 is now fully deployed

@MSNev MSNev closed this as completed Apr 27, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants