Skip to content

Commit ab1d79b

Browse files
Merge branch 'master' into chore(llma)/update-sdks
2 parents 498d1cc + f3e5d71 commit ab1d79b

File tree

4 files changed

+2443
-8
lines changed

4 files changed

+2443
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 7.0.0 - 2025-11-06
1+
# 7.0.0 - 2025-11-10
22

33
- chore(llma): update LLM provider SDKs to latest major versions
44
- openai: 1.102.0 → 2.7.1
@@ -10,6 +10,10 @@
1010
- langchain-community: 0.3.29 → 0.4.1
1111
- langgraph: 0.6.6 → 1.0.2
1212

13+
# 6.9.1 - 2025-11-07
14+
15+
- fix(error-tracking): pass code variables config from init to client
16+
1317
# 6.9.0 - 2025-11-06
1418

1519
- feat(error-tracking): add local variables capture

posthog/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
set_code_variables_mask_patterns_context as inner_set_code_variables_mask_patterns_context,
1515
set_code_variables_ignore_patterns_context as inner_set_code_variables_ignore_patterns_context,
1616
)
17+
from posthog.exception_utils import (
18+
DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS,
19+
DEFAULT_CODE_VARIABLES_MASK_PATTERNS,
20+
)
1721
from posthog.feature_flags import InconclusiveMatchError, RequiresServerEvaluation
1822
from posthog.types import FeatureFlag, FlagsAndPayloads, FeatureFlagResult
1923
from posthog.version import VERSION
@@ -177,6 +181,10 @@ def tag(name: str, value: Any):
177181

178182
default_client = None # type: Optional[Client]
179183

184+
capture_exception_code_variables = False
185+
code_variables_mask_patterns = DEFAULT_CODE_VARIABLES_MASK_PATTERNS
186+
code_variables_ignore_patterns = DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS
187+
180188

181189
# NOTE - this and following functions take unpacked kwargs because we needed to make
182190
# it impossible to write `posthog.capture(distinct-id, event-name)` - basically, to enforce
@@ -771,6 +779,9 @@ def setup() -> Client:
771779
enable_exception_autocapture=enable_exception_autocapture,
772780
log_captured_exceptions=log_captured_exceptions,
773781
enable_local_evaluation=enable_local_evaluation,
782+
capture_exception_code_variables=capture_exception_code_variables,
783+
code_variables_mask_patterns=code_variables_mask_patterns,
784+
code_variables_ignore_patterns=code_variables_ignore_patterns,
774785
)
775786

776787
# always set incase user changes it

0 commit comments

Comments
 (0)