mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-02-12 17:22:50 +00:00
fix: remove pipeline_testing_mode from telemetry events
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user