Skip to content

[BUG] Telemetry sent even though MASTRA_TELEMETRY_DISABLED=1 #7813

@anonymouskitler

Description

@anonymouskitler

Describe the Bug

My console is getting errors like

[2] Error while flushing PostHog PostHogFetchNetworkError: Network error while fetching PostHog
[2]     at retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2835:23)
[2]     at async retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:1601:25)
[2]     at async PostHog.fetchWithRetry (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2825:16)
[2]     at async PostHog._flush (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2786:17) {
[2]   error: DOMException [TimeoutError]: The operation was aborted due to timeout
[2]       at node:internal/deps/undici/undici:13510:13
[2]       at async retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2828:23)
[2]       at async retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:1601:25)
[2]       at async PostHog.fetchWithRetry (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2825:16)
[2]       at async PostHog._flush (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2786:17),
[2]   [cause]: DOMException [TimeoutError]: The operation was aborted due to timeout
[2]       at node:internal/deps/undici/undici:13510:13
[2]       at async retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2828:23)
[2]       at async retriable (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:1601:25)
[2]       at async PostHog.fetchWithRetry (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2825:16)
[2]       at async PostHog._flush (file:///<project_dir>/node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/node/index.mjs:2786:17)

I checked the issue #3729
and #6551

Steps To Reproduce

  1. Start mastra playground using pnpm dev

Expected Behavior

Environment variable - MASTRA_TELEMETRY_DISABLED=1 should be respected and stop sending events to posthog.

Environment Information

No response

Verification

  • I have searched the existing issues to make sure this is not a duplicate
  • I have included sufficient information for the team to reproduce and understand the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions