-
Notifications
You must be signed in to change notification settings - Fork 141
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
Allow custom metrics endpoint #1037
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@segment/analytics-next': minor | ||
--- | ||
|
||
Allow custom metrics endpoint |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,10 @@ export interface InitOptions { | |
plan?: Plan | ||
retryQueue?: boolean | ||
obfuscate?: boolean | ||
/** | ||
* Allows you to change the metrics endpoint used | ||
*/ | ||
metricsEndpoint?: string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you provide some background about the impetus / use case for a new setting (maybe link to the issue / description is OK)? (I saw an issue around this, but I figured we would just default to the overridden apiHost / protocol.) i.e.
(forgive me if I am missing something silly) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No that makes sense! Updated to default to that value and to respect protocol if set |
||
/** | ||
* This callback allows you to update/mutate CDN Settings. | ||
* This is called directly after settings are fetched from the CDN. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if
Stats.initRemoteMetrics
receives{ host: undefined }
? Given that we were always sending thelegacySettings.metrics
object which looks like could be either full or undefined.I'm also curious if we need this coalescing here as just above we're already overriding it.