-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Telemetry] Add telemetry.sendUsageTo config #107396
Conversation
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.
LGTM! I just added 2 NITs as potential improvements.
|
||
it('sets "telemetryConfig.sendUsageTo: prod" if "telemetry.url" uses the non-staging endpoint', () => { | ||
const rawConfig = createMockRawConfig({ | ||
url: 'random-endpoint', |
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.
optional: should we add a warning in this case?
Something like Dismissing random-endpoint
, and using Elastic's production URL.
statsGetterConfig | ||
).catch((err) => { | ||
// The server is likely behind a firewall and can't reach the remote service | ||
logger.warn( | ||
`Failed to notify "${optInStatusUrl}" from the server about the opt-in selection. Possibly blocked by a firewall? - Error: ${err.message}` | ||
`Failed to notify the telemetry endpoint about the opt-in selection. Possibly blocked by a firewall? - Error: ${err.message}` |
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.
NIT: I'd detail the URL here. If an admin finds this message annoying, they have the details in the error to fix the firewall rules.
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.
It is shown first this in the err
payload so I removed it.
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.
Oh! In that case, please dismiss the comment :)
⏳ Build in-progress, with failures
History
To update your PR or re-run it, just comment with: |
Draft until CI passes and I self-review the code.
telemetry.sendUsageTo: staging | prod
to allow specifying which telemetry endpoint the cluster should be reporting to. This is only needed for testing clusters and other internal Elastic uses cases.Deprecation notice will appear in addition to automatically updating
telemetry.sendUsageTo
if the url is pointing to staging.telemetry.url
.telemetry.optInStatusUrl
.getTelemetryChannelEndpoint
common function. This is inline with the other config getters we have in the common file.Closes #96761