Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): re-enable exception code variable capture in temporal workers (#61670)

Tom Owers193bbfdee033
diff --git a/posthog/apps.py b/posthog/apps.py
index 31a574716f21..4e72296d61ef 100644
--- a/posthog/apps.py
+++ b/posthog/apps.py
@@ -16,7 +16,6 @@ from posthog.utils import (
get_instance_region,
get_machine_id,
initialize_self_capture_api_token,
- str_to_bool,
)
logger = structlog.get_logger(__name__)
@@ -50,10 +49,7 @@ class PostHogConfig(AppConfig):
"environment": os.getenv("OTEL_SERVICE_ENVIRONMENT"),
}
- if str_to_bool(os.environ.get("TEMPORAL_DISABLE_EXCEPTION_VARIABLE_CAPTURE", "false")):
- posthoganalytics.capture_exception_code_variables = False
- else:
- posthoganalytics.capture_exception_code_variables = True # ty: ignore[invalid-assignment]
+ posthoganalytics.capture_exception_code_variables = True # ty: ignore[invalid-assignment]
if settings.E2E_TESTING:
posthoganalytics.api_key = "phc_ex7Mnvi4DqeB6xSQoXU1UVPzAmUIpiciRKQQXGGTYQO" # ty: ignore[invalid-assignment]