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

Metrics Calls When using a Proxy #984

Open
ChrisSargent opened this issue Oct 27, 2023 · 1 comment
Open

Metrics Calls When using a Proxy #984

ChrisSargent opened this issue Oct 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ChrisSargent
Copy link

Hello,

We're using a proxy for our calls to Segment in order to prevent ad blockers from blocking calls and also to ease some CSP burden.

We have this setup correctly for everything in Segment to work (loading integrations, track calls, identify calls) but the SDK still tries to make regular calls to the Segment metrics url.

Is it possible to configure this already or would it require some PR?

Thanks.

@chrisradek
Copy link
Contributor

@ChrisSargent Thanks for opening this issue. Taking a quick look - looks like the metrics endpoint should be configurable but it isn't exposed somewhere that's easy to access.

If you're using the library via the NPM package there's a rough workaround where you can pass a function in via options.updateCDNSettings that mutates the CDN settings to change the api host in metrics - but if you're using the CDN bundle there are some metrics around load failures that wouldn't be affected by this.

We should make this more easily configurable though for proxy users.

@chrisradek chrisradek added the enhancement New feature or request label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants