[Telemetry] Use header-based versioned APIs instead of path-based#159839
[Telemetry] Use header-based versioned APIs instead of path-based#159839afharo merged 9 commits intoelastic:mainfrom
Conversation
|
Documentation preview: |
| export const description = 'Get the clusters stats from the Kibana server'; | ||
| export const method = 'POST'; | ||
| export const path = '/api/telemetry/v2/clusters/_stats'; | ||
| export const path = '/internal/telemetry/clusters/_stats'; |
There was a problem hiding this comment.
I noticed this script already supports the internal header but doesn't support the version header.
We might need to solve it in a follow-up PR.
|
Pinging @elastic/kibana-core (Team:Core) |
|
Pinging @elastic/fleet (Team:Fleet) |
| return this.http.post(FetchSnapshotTelemetry, { | ||
| ...INTERNAL_VERSION, |
There was a problem hiding this comment.
This code looks good, but it does make me wonder whether we might consider providing a away to make a "version scoped" client so that you'd have smth like:
const httpV1 = this.http.createScopedClient({ version: '1' })
...
httpV1.post(FetchSnapshotTelemetry...)but yeah, just a thought, nothing to action right now.
There was a problem hiding this comment.
That's a great idea! I would ask contributors if they'd use it.
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
banderror
left a comment
There was a problem hiding this comment.
Security Solution changes LGTM 👍
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Page load bundle
History
To update your PR or re-run it, just comment with: cc @afharo |
Summary
Related to #159181.
It moves the current telemetry endpoints from path-based to header-based versioning. It also flags them as internal for Serverless.
The only one kept for BWC is
GET /api/telemetry/v2/config, as we are aware of some consumers of this API.Checklist
Risk Matrix
configendpoint).For maintainers