Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TELEMETRY_ENDPOINT } from './constants';
import { integTest, withDefaultFixture } from '../../lib';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime

integTest(
'CLI Telemetry --disable does not send to endpoint',
withDefaultFixture(async (fixture) => {
const output = await fixture.cdk(['cli-telemetry', '--disable'], { verboseLevel: 3, modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT } });
const output = await fixture.cdk(['cli-telemetry', '--disable'], { verboseLevel: 3 });

// Check the trace that telemetry was not executed successfully
expect(output).not.toContain('Telemetry Sent Successfully');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as path from 'path';
import * as fs from 'fs-extra';
import { TELEMETRY_ENDPOINT } from './constants';
import { integTest, withDefaultFixture } from '../../lib';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
Expand All @@ -14,7 +13,6 @@ integTest(
const deployOutput = await fixture.cdkDeploy('test-1', {
telemetryFile,
verboseLevel: 3, // trace mode
modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT },
});

// Check the trace that telemetry was executed successfully
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as path from 'path';
import * as fs from 'fs-extra';
import { TELEMETRY_ENDPOINT } from './constants';
import { integTest, withDefaultFixture } from '../../lib';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
Expand All @@ -13,7 +12,6 @@ integTest(
allowErrExit: true,
modEnv: {
INTEG_STACK_SET: 'stage-with-errors',
TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT,
},
verboseLevel: 3, // trace mode
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as path from 'path';
import * as fs from 'fs-extra';
import { TELEMETRY_ENDPOINT } from './constants';
import { integTest, withDefaultFixture } from '../../lib';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
Expand All @@ -12,7 +11,7 @@ integTest(

const synthOutput = await fixture.cdk(
['synth', fixture.fullStackName('test-1'), '--unstable=telemetry', `--telemetry-file=${telemetryFile}`],
{ modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT }, verboseLevel: 3 }, // trace mode
{ verboseLevel: 3 }, // trace mode
);

// Check the trace that telemetry was executed successfully
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/cli/io-host/cli-io-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class CliIoHost implements IIoHost {
}
}

const telemetryEndpoint = process.env.TELEMETRY_ENDPOINT;
const telemetryEndpoint = process.env.TELEMETRY_ENDPOINT ?? 'https://cdk-cli-telemetry.us-east-1.api.aws/metrics';
if (canCollectTelemetry(args, context) && telemetryEndpoint) {
try {
sinks.push(new EndpointTelemetrySink({
Expand Down
Loading