Skip to content

Commit

Permalink
Remove send on demand feature flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjhampton committed Jun 29, 2021
1 parent eb75a93 commit cbd499d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class TelemetryEndpointTask {
});

// Feature flag disabling channel send for now
this.sender.sendOnDemand('endpoint-metadata', telemetryPayloads, true);
this.sender.sendOnDemand('endpoint-metadata', telemetryPayloads);
return telemetryPayloads.length;
};
}
22 changes: 8 additions & 14 deletions x-pack/plugins/security_solution/server/lib/telemetry/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ export class TelemetryEventsSender {
* @param channel the elastic telemetry channel
* @param toSend telemetry events
*/
public async sendOnDemand(
channel: string,
toSend: unknown[],
featureDisableSending: boolean = true
) {
public async sendOnDemand(channel: string, toSend: unknown[]) {
try {
const [telemetryUrl, clusterInfo, licenseInfo] = await Promise.all([
this.fetchTelemetryUrl(channel),
Expand All @@ -355,15 +351,13 @@ export class TelemetryEventsSender {
`cluster_uuid: ${clusterInfo?.cluster_uuid} cluster_name: ${clusterInfo?.cluster_name}`
);

if (!featureDisableSending) {
await this.sendEvents(
toSend,
telemetryUrl,
clusterInfo.cluster_uuid,
clusterInfo.version?.number,
licenseInfo?.uid
);
}
await this.sendEvents(
toSend,
telemetryUrl,
clusterInfo.cluster_uuid,
clusterInfo.version?.number,
licenseInfo?.uid
);
} catch (err) {
this.logger.warn(`Error sending telemetry events data: ${err}`);
}
Expand Down

0 comments on commit cbd499d

Please sign in to comment.