mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
synthetics - add cluster name to telemetry headers (#125940)
This commit is contained in:
parent
454f3270d0
commit
260240fc64
2 changed files with 6 additions and 2 deletions
|
@ -130,6 +130,7 @@ describe('TelemetryEventsSender', () => {
|
|||
headers: {
|
||||
'Content-Type': 'application/x-ndjson',
|
||||
'X-Elastic-Cluster-ID': '1',
|
||||
'X-Elastic-Cluster-Name': 'name',
|
||||
'X-Elastic-Stack-Version': '8.0.0',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -134,7 +134,8 @@ export class TelemetryEventsSender {
|
|||
events,
|
||||
telemetryUrl,
|
||||
clusterInfo?.cluster_uuid,
|
||||
clusterInfo?.version?.number
|
||||
clusterInfo?.version?.number,
|
||||
clusterInfo?.cluster_name
|
||||
);
|
||||
} catch (err) {
|
||||
this.logger.debug(`Error sending telemetry events data: ${err}`);
|
||||
|
@ -162,7 +163,8 @@ export class TelemetryEventsSender {
|
|||
events: unknown[],
|
||||
telemetryUrl: string,
|
||||
clusterUuid: string | undefined,
|
||||
clusterVersionNumber: string | undefined
|
||||
clusterVersionNumber: string | undefined,
|
||||
clusterName: string | undefined
|
||||
) {
|
||||
// using ndjson so that each line will be wrapped in json envelope on server side
|
||||
// see https://github.com/elastic/infra/blob/master/docs/telemetry/telemetry-next-dataflow.md#json-envelope
|
||||
|
@ -173,6 +175,7 @@ export class TelemetryEventsSender {
|
|||
headers: {
|
||||
'Content-Type': 'application/x-ndjson',
|
||||
'X-Elastic-Cluster-ID': clusterUuid,
|
||||
'X-Elastic-Cluster-Name': clusterName,
|
||||
'X-Elastic-Stack-Version': clusterVersionNumber ? clusterVersionNumber : '8.2.0',
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue