Skip to content

Commit 720d20d

Browse files
committed
chore: move process_exception fix to unreleased and merge master
Merge latest master changes (ai_framework feature) and move the process_exception fix to Unreleased section. Will be released together with async user access fix as 6.7.12.
2 parents 974ee42 + f719c3d commit 720d20d

File tree

6 files changed

+2353
-3
lines changed

6 files changed

+2353
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# 6.7.11 - 2025-10-24
1+
# Unreleased
22

33
- fix(django): Restore process_exception method to capture view and downstream middleware exceptions (fixes #329)
44

5+
# 6.7.11 - 2025-10-28
6+
7+
- feat(ai): Add `$ai_framework` property for framework integrations (e.g. LangChain)
8+
59
# 6.7.10 - 2025-10-24
610

711
- fix(django): Make middleware truly hybrid - compatible with both sync (WSGI) and async (ASGI) Django stacks without breaking sync-only deployments

posthog/ai/langchain/callbacks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ def _capture_trace_or_span(
486486
"$ai_latency": run.latency,
487487
"$ai_span_name": run.name,
488488
"$ai_span_id": run_id,
489+
"$ai_framework": "langchain",
489490
}
490491
if parent_run_id is not None:
491492
event_properties["$ai_parent_id"] = parent_run_id
@@ -556,6 +557,7 @@ def _capture_generation(
556557
"$ai_http_status": 200,
557558
"$ai_latency": run.latency,
558559
"$ai_base_url": run.base_url,
560+
"$ai_framework": "langchain",
559561
}
560562

561563
if run.tools:

posthog/test/ai/langchain/test_callbacks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def test_basic_chat_chain(mock_client, stream):
204204
# Generation is second
205205
assert generation_args["event"] == "$ai_generation"
206206
assert "distinct_id" in generation_args
207+
assert generation_props["$ai_framework"] == "langchain"
207208
assert "$ai_model" in generation_props
208209
assert "$ai_provider" in generation_props
209210
assert generation_props["$ai_input"] == [

posthog/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = "6.7.11"
1+
VERSION = "6.7.11" # Will be bumped to 6.7.12 on release
22

33
if __name__ == "__main__":
44
print(VERSION, end="") # noqa: T201

0 commit comments

Comments
 (0)