fix: remove pipeline_testing_mode from telemetry events

This commit is contained in:
ajmallesh
2026-01-13 18:17:33 -08:00
parent 636ae6fb19
commit 7dc8cfe5c7
3 changed files with 2 additions and 9 deletions

View File

@@ -118,7 +118,6 @@ class TelemetryManager {
private config: TelemetryConfig;
private distinctId: string;
private initialized = false;
private pipelineTestingMode = false;
constructor() {
this.config = loadTelemetryConfig();
@@ -137,16 +136,13 @@ class TelemetryManager {
/**
* Initialize PostHog client.
* Safe: never throws, logs warning on failure.
*
* @param pipelineTestingMode - Whether running in testing mode
*/
initialize(pipelineTestingMode = false): void {
initialize(): void {
try {
if (this.initialized) {
return;
}
this.pipelineTestingMode = pipelineTestingMode;
this.initialized = true;
if (!this.config.enabled) {
@@ -187,7 +183,6 @@ class TelemetryManager {
// Build base properties
const baseProps: BaseTelemetryProperties & Record<string, unknown> = {
pipeline_testing_mode: this.pipelineTestingMode,
os_platform: process.platform,
node_version: process.version,
$lib: 'shannon',

View File

@@ -135,7 +135,7 @@ async function startPipeline(): Promise<void> {
const installationId = await getInstallationId();
// Initialize telemetry with installation ID as distinct ID (for unique user tracking)
telemetry.initialize(pipelineTestingMode);
telemetry.initialize();
telemetry.setDistinctId(installationId);
const input: PipelineInput = {
@@ -172,7 +172,6 @@ async function startPipeline(): Promise<void> {
// Track workflow start
telemetry.track(TelemetryEvent.WORKFLOW_START, {
has_config: !!configPath,
pipeline_testing_mode: pipelineTestingMode,
target_hash: hashTargetUrl(webUrl),
workflow_id: workflowId,
});

View File

@@ -39,7 +39,6 @@ async function runWorker(): Promise<void> {
const connection = await NativeConnection.connect({ address });
// Initialize telemetry for activity execution
// Worker doesn't know pipelineTestingMode until activity runs, so default to false
telemetry.initialize();
// Bundle workflows for Temporal's V8 isolate