Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
945bbbc
ci: reuse Python SDK upgrade PRs unless queued (#1021)
dustinbyrne Oct 7, 2026
6d6cc3d
feat(error-tracking): standardize exception event metadata (#898)
hpouillot Oct 8, 2026
c4e6bdd
chore: Release v7.65.0 [skip ci]
releaser-posthog-python[bot] Oct 8, 2026
50efa65
Update generated references
releaser-posthog-python[bot] Oct 8, 2026
1c6a47a
feat(asgi): add error tracking middleware (#1037)
hpouillot Oct 8, 2026
127009d
feat(mcp): resolve fresh low-level tool ownership (#1009)
gesh Oct 8, 2026
292855d
feat(flask): add error tracking integration (#1038)
hpouillot Oct 8, 2026
d23ef68
chore: Release v7.66.0 [skip ci]
releaser-posthog-python[bot] Oct 8, 2026
c0e05b1
Update generated references
releaser-posthog-python[bot] Oct 8, 2026
9baf8a5
feat(drf): add automatic error tracking integration (#1036)
hpouillot Oct 9, 2026
a655c8b
chore: Release v7.67.0 [skip ci]
releaser-posthog-python[bot] Oct 9, 2026
509c852
Update generated references
releaser-posthog-python[bot] Oct 9, 2026
a3bd254
feat(mcp): set $mcp_interface on mcp analytics events (#1032)
gesh Oct 12, 2026
4ae3d26
chore: Release v7.67.1 [skip ci]
releaser-posthog-python[bot] Oct 12, 2026
492d71b
Update generated references
releaser-posthog-python[bot] Oct 12, 2026
2f0d67d
feat(integrations): align request middleware configuration (#1040)
hpouillot Oct 12, 2026
ad553de
chore: Release v7.68.0 [skip ci]
releaser-posthog-python[bot] Oct 12, 2026
90f8d69
Update generated references
releaser-posthog-python[bot] Oct 12, 2026
ee686ff
chore(deps): bump the uv group across 2 directories with 3 updates (#…
dependabot[bot] Oct 12, 2026
3cc2d64
feat(metrics): attach trace exemplars to flushed metric series (#1057)
DanielVisca Oct 13, 2026
653ff87
chore: Release v7.69.0 [skip ci]
releaser-posthog-python[bot] Oct 13, 2026
6f65898
Update generated references
releaser-posthog-python[bot] Oct 13, 2026
6916499
feat(ai): add per-request context to span processor (#1060)
carlos-marchal-ph Oct 14, 2026
a615eed
chore: Release v7.70.0 [skip ci]
releaser-posthog-python[bot] Oct 14, 2026
a49648e
Update generated references
releaser-posthog-python[bot] Oct 14, 2026
10d094e
fix(prompts): share one request between concurrent fetches of the sam…
jurajmajerik Oct 15, 2026
ec71a24
chore: Release v7.70.1 [skip ci]
releaser-posthog-python[bot] Oct 15, 2026
fc3c434
Update generated references
releaser-posthog-python[bot] Oct 15, 2026
fec41f2
fix(ai): mark cancelled async LLM calls as errors (#1065)
marandaneto Oct 15, 2026
e381808
chore: Release v7.70.2 [skip ci]
releaser-posthog-python[bot] Oct 15, 2026
f33d55d
Update generated references
releaser-posthog-python[bot] Oct 15, 2026
f44cf19
test(mcp): remove outdated FastMCP middleware discovery assumptions (…
marandaneto Oct 15, 2026
f95e1f4
chore(deps): bump the ai-providers group with 8 updates (#1054)
dependabot[bot] Oct 16, 2026
9b7e632
chore(deps): bump the github-actions group with 2 updates (#1055)
dependabot[bot] Oct 16, 2026
12e88a2
chore(deps): bump mcp from 1.28.1 to 1.30.0 (#1068)
dependabot[bot] Oct 16, 2026
780cba9
fix(integrations): align tracing-header capture across frameworks (#1…
dustinbyrne Oct 16, 2026
d0b6f71
docs: clarify reusable flush and terminal shutdown guidance (#1043)
marandaneto Oct 16, 2026
20a574e
chore: Release v7.71.0 [skip ci]
releaser-posthog-python[bot] Oct 16, 2026
883eaca
Update generated references
releaser-posthog-python[bot] Oct 16, 2026
b1363dc
chore(deps): bump the uv group across 4 directories with 2 updates (#…
dependabot[bot] Oct 16, 2026
a89acf8
chore(deps-dev): bump claude-agent-sdk from 0.1.50 to 0.2.121 (#1073)
dependabot[bot] Oct 16, 2026
facd617
feat(mcp): stop sending standalone $identify events (#1067)
gesh Oct 19, 2026
876b955
chore: Release v7.72.0 [skip ci]
releaser-posthog-python[bot] Oct 19, 2026
b8327de
Update generated references
releaser-posthog-python[bot] Oct 19, 2026
3822271
chore(deps): bump the github-actions group with 6 updates (#1083)
dependabot[bot] Oct 19, 2026
9b70476
chore(deps): bump the ai-providers group with 6 updates (#1082)
dependabot[bot] Oct 19, 2026
b086f65
feat(llma): support scorer and experiment tags (#1085)
Radu-Raicea Oct 19, 2026
81931fa
chore: Release v7.73.0 [skip ci]
releaser-posthog-python[bot] Oct 19, 2026
9e62e0f
Update generated references
releaser-posthog-python[bot] Oct 19, 2026
20dabaa
fix(flags): accept rediss:// URLs for flag_fallback_cache_url (#1080)
sebxt Oct 19, 2026
223b592
chore: Release v7.73.1 [skip ci]
releaser-posthog-python[bot] Oct 20, 2026
e9e0830
Update generated references
releaser-posthog-python[bot] Oct 20, 2026
305dee3
chore(deps): bump aiohttp from 3.14.3 to 3.14.4 (#1086)
dependabot[bot] Oct 20, 2026
1b86549
chore(deps): bump the uv group across 7 directories with 1 update (#1…
dependabot[bot] Oct 20, 2026
63b5dcc
fix(flags): compare numeric string properties numerically (#1088)
dustinbyrne Oct 20, 2026
cb7580e
chore: Release v7.73.2 [skip ci]
releaser-posthog-python[bot] Oct 20, 2026
1222ac7
Update generated references
releaser-posthog-python[bot] Oct 20, 2026
f70b3cc
fix(ai): keep the openai.Stream API on sync OpenAI streams (#1062)
mosafariuk Oct 21, 2026
57d1607
fix(ai): take cumulative Anthropic stream usage from message_delta (#…
pcbeingused333 Oct 21, 2026
24c6722
chore: Release v7.73.3 [skip ci]
releaser-posthog-python[bot] Oct 21, 2026
bf87352
Update generated references
releaser-posthog-python[bot] Oct 21, 2026
b8879a7
feat(llma): add datasets to offline evaluations (#1090)
Radu-Raicea Oct 21, 2026
ac7fa99
chore: Release v7.74.0 [skip ci]
releaser-posthog-python[bot] Oct 21, 2026
b14dd9e
Update generated references
releaser-posthog-python[bot] Oct 21, 2026
5f01fe9
feat(django): add request context to OpenTelemetry spans (#1070)
pauldambra Oct 21, 2026
5ddb446
fix: enrich Flask, ASGI, and Celery spans with context (#1075)
pauldambra Oct 21, 2026
908c77b
chore: Release v7.75.0 [skip ci]
releaser-posthog-python[bot] Oct 21, 2026
a5b93ee
Update generated references
releaser-posthog-python[bot] Oct 21, 2026
e9056e3
fix(flags): match explicit null properties with string operators (#1092)
marandaneto Oct 22, 2026
361ca83
chore: Release v7.75.1 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
5e296d8
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
4697e6f
fix(ai): capture OpenAI chat custom tool calls instead of raising (#1…
mosafariuk Oct 22, 2026
e63a898
chore: Release v7.75.2 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
e9710ec
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
dc2a2b4
fix(ai): record mid-stream errors on streamed OpenAI, Anthropic and G…
pcbeingused333 Oct 22, 2026
42c8b7b
fix(ai): keep the refusal of a non-streamed OpenAI chat completion in…
pcbeingused333 Oct 22, 2026
a6ddc2e
fix(ai): record an integer $ai_http_status in the LangChain callback …
pcbeingused333 Oct 22, 2026
dc01266
chore: Release v7.75.3 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
9185524
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
34ec4f8
fix(ai): keep latest cumulative output tokens across message_deltas (…
Harsh23Kashyap Oct 22, 2026
84664b4
chore: Release v7.75.4 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
e17a8be
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
18b39e8
fix: serialize non-finite floats as null in JSON payloads (#1081)
Harsh23Kashyap Oct 22, 2026
635ac23
test(mcp): drop get_tool checks that fastmcp 4.0.11 invalidated (#1049)
eli-r-ph Oct 22, 2026
b3fcec6
fix: annotate client timeouts as float (#1106)
turnipdabeets Oct 22, 2026
a774223
chore: Release v7.75.5 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
8c2d8f6
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
a95331f
fix(flags): retain tracking metadata in local evaluation snapshots (#…
dustinbyrne Oct 22, 2026
a5909dc
chore: Release v7.75.6 [skip ci]
releaser-posthog-python[bot] Oct 22, 2026
4b280fc
Update generated references
releaser-posthog-python[bot] Oct 22, 2026
7651b10
chore(deps): bump uv to 0.13.4 and certifi to 2026.10.19 (#1104)
gantoine Oct 22, 2026
ffde3c5
fix(ai): keep streamed OpenAI tool calls that have no index (#1091)
pcbeingused333 Oct 23, 2026
7f4c9be
chore: Release v7.75.7 [skip ci]
releaser-posthog-python[bot] Oct 23, 2026
b5eb2de
Update generated references
releaser-posthog-python[bot] Oct 23, 2026
e65ed67
docs: require signed commits in contributor docs (#1111)
turnipdabeets Oct 23, 2026
d58380e
fix(flags): fall back for incompatible local regex evaluation (#1108)
marandaneto Oct 23, 2026
72e0131
chore: Release v7.75.8 [skip ci]
releaser-posthog-python[bot] Oct 23, 2026
a020e70
Update generated references
releaser-posthog-python[bot] Oct 23, 2026
efc866e
fix(examples): use gpt-image-2.5-flare in the OpenAI image generation…
pcbeingused333 Oct 23, 2026
8cd8eb5
fix(mcp): send one $mcp_initialize per initialize request (#1103)
gesh Oct 23, 2026
48889b6
fix(ai): take cumulative usage and web searches from the Claude Agent…
pcbeingused333 Oct 23, 2026
5a2ea5f
chore: Release v7.75.9 [skip ci]
releaser-posthog-python[bot] Oct 23, 2026
e3fd9a4
Update generated references
releaser-posthog-python[bot] Oct 23, 2026
25d2767
fix(ai): record the HTTP status of google-genai errors (#1110)
pcbeingused333 Oct 23, 2026
82f948b
chore: Release v7.75.10 [skip ci]
releaser-posthog-python[bot] Oct 23, 2026
b0a2783
Update generated references
releaser-posthog-python[bot] Oct 23, 2026
04e6a4c
fix(aio): keep content out of ai events in privacy mode (#1105)
carlos-marchal-ph Oct 23, 2026
fb9b66b
chore: Release v7.75.11 [skip ci]
releaser-posthog-python[bot] Oct 23, 2026
16d618b
Update generated references
releaser-posthog-python[bot] Oct 23, 2026
bc7b403
chore(deps): bump opentelemetry-api from 1.40.0 to 1.45.1 (#1117)
dependabot[bot] Oct 23, 2026
125b266
chore(deps): bump djangorestframework from 3.18.1 to 3.18.2 (#1118)
dependabot[bot] Oct 23, 2026
3f6c80e
chore(deps): bump the uv group across 31 directories with 1 update (#…
dependabot[bot] Oct 23, 2026
284340d
feat(llma): support per-item offline evaluation models (#1130)
Radu-Raicea Oct 27, 2026
7d15127
chore: Release v7.76.0 [skip ci]
releaser-posthog-python[bot] Oct 27, 2026
7833e95
Update generated references
releaser-posthog-python[bot] Oct 27, 2026
b0a2b59
feat(ai): record the Anthropic web search count in the LangChain call…
pcbeingused333 Oct 28, 2026
a736b43
chore: Release v7.76.1 [skip ci]
releaser-posthog-python[bot] Oct 28, 2026
3044d8e
Update generated references
releaser-posthog-python[bot] Oct 28, 2026
d8a1b97
feat(mcp): add a send_initialize_event option (#1115)
gesh Oct 28, 2026
786db57
chore: Release v7.77.0 [skip ci]
releaser-posthog-python[bot] Oct 28, 2026
0894015
Update generated references
releaser-posthog-python[bot] Oct 28, 2026
351da59
feat(mcp): add a send_tools_list_event option (#1116)
gesh Oct 28, 2026
3911020
chore: Release v7.78.0 [skip ci]
releaser-posthog-python[bot] Oct 28, 2026
75a1794
Update generated references
releaser-posthog-python[bot] Oct 28, 2026
7083998
chore(deps): bump the github-actions group with 3 updates (#1128)
dependabot[bot] Oct 28, 2026
bb2b9d6
feat: report unresolved local flags on evaluate_flags snapshots (#1133)
gustavohstrassburger Oct 28, 2026
91d3188
chore: Release v7.79.0 [skip ci]
releaser-posthog-python[bot] Oct 28, 2026
130f5a1
Update generated references
releaser-posthog-python[bot] Oct 28, 2026
febb3ed
feat(metrics): metrics autocapture for HTTP, database and runtime met…
DanielVisca Oct 29, 2026
ce03e47
chore: Release v7.80.0 [skip ci]
releaser-posthog-python[bot] Oct 29, 2026
175fac6
Update generated references
releaser-posthog-python[bot] Oct 29, 2026
1625f4f
fix(ai): handle None and NOT_GIVEN stream_options without mutating th…
pcbeingused333 Oct 29, 2026
58d69e3
chore: Release v7.80.1 [skip ci]
releaser-posthog-python[bot] Oct 29, 2026
e4f43a4
Update generated references
releaser-posthog-python[bot] Oct 29, 2026
ad1b1cb
fix(ai): capture an $ai_embedding event when an OpenAI embeddings cal…
pcbeingused333 Oct 29, 2026
9a9d806
chore: Release v7.80.2 [skip ci]
releaser-posthog-python[bot] Oct 29, 2026
ad79bd0
Update generated references
releaser-posthog-python[bot] Oct 29, 2026
4d6e447
fix(ai): report OpenAI Agents cached tokens (#1102)
mosafariuk Oct 29, 2026
2989cd2
chore: Release v7.80.3 [skip ci]
releaser-posthog-python[bot] Oct 29, 2026
c380dc8
Update generated references
releaser-posthog-python[bot] Oct 29, 2026
6f765a3
chore(deps): bump setuptools from 83.0.0 to 84.1.0 in /examples/examp…
dependabot[bot] Oct 29, 2026
871ad9e
chore(deps): bump authlib from 1.7.2 to 1.9.1 (#1140)
dependabot[bot] Oct 29, 2026
c9105c5
chore(deps): bump the ai-providers group across 1 directory with 7 up…
dependabot[bot] Oct 29, 2026
50cf357
ci: pin Python 3.11 by minor version for Ubuntu 26.04 runners (#1153)
andehen Oct 30, 2026
01e91db
feat: send transactional email from posthog templates (#1093)
mayteio Oct 30, 2026
139161e
chore: Release v7.81.0 [skip ci]
releaser-posthog-python[bot] Oct 30, 2026
af8e1aa
Update generated references
releaser-posthog-python[bot] Oct 30, 2026
be77b83
fix(ai): keep the choices of an n>1 OpenAI chat stream apart (#1152)
jaeminbird Oct 30, 2026
a61e64d
fix(ai): preserve Gemini tool call IDs in captured generations (#1150)
mosafariuk Oct 30, 2026
f23efe9
chore: Release v7.81.1 [skip ci]
releaser-posthog-python[bot] Oct 30, 2026
dca2207
Update generated references
releaser-posthog-python[bot] Oct 30, 2026
b4c2e47
docs(mcp): clarify unsigned session token trust (#1151)
dustinbyrne Nov 2, 2026
f20066e
feat: send a flat body from emails.send (#1155)
mayteio Nov 2, 2026
0aec2d9
chore: Release v7.81.2 [skip ci]
releaser-posthog-python[bot] Nov 2, 2026
14b4d33
Update generated references
releaser-posthog-python[bot] Nov 2, 2026
b10c38a
feat: add a per-read send_feature_flag_events option to snapshot read…
andehen Nov 2, 2026
e24100b
fix: send flag id and version on locally evaluated $feature_flag_call…
andehen Nov 2, 2026
b6f8eaf
chore: Release v7.82.0 [skip ci]
releaser-posthog-python[bot] Nov 2, 2026
0a5417f
Update generated references
releaser-posthog-python[bot] Nov 2, 2026
9ebfb87
fix(flags): treat concurrent fallback-cache eviction as a cache miss …
Sarbajit-Sengupta Nov 2, 2026
5b50683
fix(flags): stringify regex properties as compact JSON (#1157)
luantaraschi Nov 2, 2026
a239479
fix(flags): serialize UUID values in flags request bodies (#1156)
luantaraschi Nov 2, 2026
8c5e9df
chore: Release v7.82.1 [skip ci]
releaser-posthog-python[bot] Nov 2, 2026
fbbd109
Update generated references
releaser-posthog-python[bot] Nov 2, 2026
57b9db8
fix(ai): count Gemini tool use prompt tokens as input tokens (#1164)
pcbeingused333 Nov 2, 2026
16e99f0
chore: Release v7.82.2 [skip ci]
releaser-posthog-python[bot] Nov 2, 2026
1dfca27
Update generated references
releaser-posthog-python[bot] Nov 2, 2026
e094dc5
feat(flags): read the /flags?v=4 response (#1031)
andehen Nov 3, 2026
43c7545
chore: Release v7.83.0 [skip ci]
releaser-posthog-python[bot] Nov 3, 2026
314fad0
Update generated references
releaser-posthog-python[bot] Nov 3, 2026
0c12ca1
fix(mcp): inject context into mcp 2.x tool objects and test without f…
connor-grady Nov 3, 2026
9f5d458
chore: Release v7.83.1 [skip ci]
releaser-posthog-python[bot] Nov 3, 2026
06e5611
Update generated references
releaser-posthog-python[bot] Nov 3, 2026
ff90d0b
docs(examples): update Anthropic examples to claude-sonnet-5-5 (#1173)
pcbeingused333 Nov 4, 2026
ae2dcf2
fix(flags): respect feature enrollment in local evaluation (#1176)
puemos Nov 4, 2026
d8571c3
chore: Release v7.83.2 [skip ci]
releaser-posthog-python[bot] Nov 4, 2026
2c09582
Update generated references
releaser-posthog-python[bot] Nov 4, 2026
7e1afec
ci: add paired Python SDK performance benchmarks (#1134)
dustinbyrne Nov 4, 2026
db52a78
ci: integrate shared Python benchmark reports (#1135)
dustinbyrne Nov 4, 2026
7cd0d8a
fix(ai): record the HTTP status of streaming google-genai errors (#1188)
pcbeingused333 Nov 5, 2026
ff18e0f
chore: Release v7.83.3 [skip ci]
releaser-posthog-python[bot] Nov 5, 2026
8a40ae3
Update generated references
releaser-posthog-python[bot] Nov 5, 2026
b741c65
fix(ai): don't subtract cache tokens twice for ChatAnthropic invoke (…
jaeminbird Nov 5, 2026
063f1ce
feat: send email content from code with posthog.emails.send (#1171)
Silthus Nov 5, 2026
5164252
chore: Release v7.84.0 [skip ci]
releaser-posthog-python[bot] Nov 5, 2026
5febc73
Update generated references
releaser-posthog-python[bot] Nov 5, 2026
f3116ff
fix(mcp): reword injected descriptions so directory review stops flag…
lucasheriques Nov 5, 2026
780f5c0
chore: Release v7.84.1 [skip ci]
releaser-posthog-python[bot] Nov 5, 2026
6b7c0ba
Update generated references
releaser-posthog-python[bot] Nov 5, 2026
11585fb
fix(flags): do not retry a refused flags connection (#1180)
luantaraschi Nov 6, 2026
acbc71e
chore: Release v7.84.2 [skip ci]
releaser-posthog-python[bot] Nov 6, 2026
5f5665c
Update generated references
releaser-posthog-python[bot] Nov 6, 2026
3f93a34
fix(flags): skip client-only definition warnings (#1198)
marandaneto Nov 6, 2026
44d817e
chore: Release v7.84.3 [skip ci]
releaser-posthog-python[bot] Nov 6, 2026
1402030
Update generated references
releaser-posthog-python[bot] Nov 6, 2026
778f386
feat(mcp): tell directory reviews what the virtual tools record (#1204)
lucasheriques Nov 6, 2026
5ed0bbe
chore: Release v7.85.0 [skip ci]
releaser-posthog-python[bot] Nov 6, 2026
a1dd81c
Update generated references
releaser-posthog-python[bot] Nov 6, 2026
0aa5df1
feat(mcp): align posthog.mcp with the sdk-specs MCP spec (#1199)
lucasheriques Nov 6, 2026
5f2ee56
feat(mcp): declare posthog.mcp stable (#1200)
lucasheriques Nov 6, 2026
d8a7ff0
fix(mcp): don't read the advertised schema on FastMCP 2.x (#1203)
lucasheriques Nov 6, 2026
585a8f6
chore: Release v7.86.0 [skip ci]
releaser-posthog-python[bot] Nov 6, 2026
ac55b35
Update generated references
releaser-posthog-python[bot] Nov 6, 2026
bf3adb3
fix(flags): return no payload for a failed flag record (#1177)
andehen Nov 9, 2026
cbab7c0
chore: Release v7.86.1 [skip ci]
releaser-posthog-python[bot] Nov 9, 2026
de03040
Update generated references
releaser-posthog-python[bot] Nov 9, 2026
3c398e5
fix(capture): retry capture v1 requests that get 404 or 429 (#1178)
andehen Nov 9, 2026
39be12a
chore: Release v7.86.2 [skip ci]
releaser-posthog-python[bot] Nov 9, 2026
bf4a090
Update generated references
releaser-posthog-python[bot] Nov 9, 2026
2a2e578
fix(errors): order and mark the stack of a never-raised exception (#1…
luantaraschi Nov 9, 2026
68e28b6
chore: Release v7.86.3 [skip ci]
releaser-posthog-python[bot] Nov 9, 2026
352925c
Update generated references
releaser-posthog-python[bot] Nov 9, 2026
27c12a3
chore(deps): bump the github-actions group across 1 directory with 7 …
dependabot[bot] Nov 9, 2026
b7b962a
chore(deps): bump joserfc from 1.7.1 to 1.7.6 (#1161)
dependabot[bot] Nov 9, 2026
0ee202e
chore(deps): bump virtualenv from 21.7.13 to 21.14.13 (#1162)
dependabot[bot] Nov 9, 2026
9be86e7
chore(deps): bump pyasn1 from 0.6.4 to 0.6.5 (#1197)
dependabot[bot] Nov 9, 2026
2c35f04
fix(ai): capture an error event when a streaming call fails to connec…
pcbeingused333 Nov 9, 2026
a2ba575
chore: Release v7.86.4 [skip ci]
releaser-posthog-python[bot] Nov 9, 2026
c78e7bb
Update generated references
releaser-posthog-python[bot] Nov 9, 2026
133d7d1
test(compliance): expose the legacy payload accessor to the harness (…
andehen Nov 9, 2026
53770bc
fix(celery): keep a task's own celery tags over propagated ones (#1209)
eli-r-ph Nov 10, 2026
d572d09
fix: handle AsyncPosthog in the LangChain and new_context exception p…
eli-r-ph Nov 10, 2026
65a3e9b
chore: Release v7.86.5 [skip ci]
releaser-posthog-python[bot] Nov 10, 2026
9b46391
Update generated references
releaser-posthog-python[bot] Nov 10, 2026
9d154da
ci: keep dependabot from raising uv/pip manifest floors (#1219)
ioannisj Nov 10, 2026
4d73230
fix(ai): report thinking tokens from the Anthropic wrapper (#1205)
pcbeingused333 Nov 10, 2026
1342bb0
fix(exception-capture): normalize NaN rate-limit settings (#1210)
peterolkhov Nov 10, 2026
8c6b328
fix(flags): clamp relative month and year lookbacks after every step …
luantaraschi Nov 10, 2026
b5dbdce
chore: Release v7.86.6 [skip ci]
releaser-posthog-python[bot] Nov 10, 2026
1f185fd
Update generated references
releaser-posthog-python[bot] Nov 10, 2026
79f3559
chore(deps): bump the github-actions group with 2 updates (#1220)
dependabot[bot] Nov 10, 2026
08aac1d
ci: notify Slack when release jobs fail, are cancelled, or never run …
ioannisj Nov 10, 2026
93fefa6
docs: add the Markdown reference adapter (#1182)
gewenyu99 Nov 10, 2026
32e8f41
docs: generate the 7.x Markdown reference (#1183)
gewenyu99 Nov 10, 2026
ec79737
docs: generate the experimental 8 reference and migration page (#1184)
gewenyu99 Nov 10, 2026
21c828c
docs: generate the Markdown reference on release and remove HogRef ge…
gewenyu99 Nov 10, 2026
ae8f0bd
chore(references): keep HogRef JSON only for versions people install …
gewenyu99 Nov 10, 2026
f66e696
chore(deps): bump the uv group across 8 directories with 8 updates (#…
dependabot[bot] Nov 11, 2026
5febfd9
feat(flags): send $experiment_exposure for v2 experiment splits (#1154)
andehen Nov 11, 2026
8c9867c
chore: Release v7.87.0 [skip ci]
releaser-posthog-python[bot] Nov 11, 2026
b182023
Update generated references
releaser-posthog-python[bot] Nov 11, 2026
c28716c
fix(flags): keep IPv6 brackets in Redis fallback cache URLs (#1228)
ioannisj Nov 11, 2026
c60e7a6
chore: Release v7.87.1 [skip ci]
releaser-posthog-python[bot] Nov 11, 2026
994adb7
chore: merge main into v1 up to 7.86.x (emails, MCP alignment, flags,…
eli-r-ph Nov 11, 2026
c9185bd
chore: merge main into v1 (7.87.0-7.87.1: $experiment_exposure, IPv6 …
eli-r-ph Nov 11, 2026
268c613
docs: regenerate the 8.x and migration references from this branch
eli-r-ph Nov 11, 2026
80563b2
test(benchmarks): run the paired benchmarks against capture v1
eli-r-ph Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ updates:
- dependency-name: "langchain*"
- dependency-name: "langgraph"
open-pull-requests-limit: 1
versioning-strategy: increase-if-necessary
reviewers:
- "PostHog/team-llm-analytics"

Expand Down Expand Up @@ -57,6 +58,7 @@ updates:
- dependency-name: "langchain*"
- dependency-name: "langgraph"
open-pull-requests-limit: 1
versioning-strategy: increase-if-necessary
reviewers:
- "PostHog/team-llm-analytics"
# Uncomment below to enable auto-merge for minor updates when CI passes
Expand Down
32 changes: 27 additions & 5 deletions .github/scripts/check_strict_types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import atexit

import posthog
from posthog import FeatureFlagEvaluations, FlagValue, Posthog
from posthog.emails import AsyncEmails, Emails, SendEmailResult
from posthog.ai.evaluations import (
AsyncOfflineEvaluations,
BooleanScorerConfig,
Expand All @@ -40,6 +41,16 @@ span.end()

_ = (flag_value, all_flags, enabled, payload, evaluations, active)

emails = Emails("phs_example")
template_send: SendEmailResult = emails.send(to="user@example.com", template_id="0190f6d2-7c1e-7b3a-9f5e-1c2d3e4f5a6b", template_data={"name": "Ada"})
rendered_send: SendEmailResult = emails.send(to="user@example.com", template_key="password-reset", subject="Reset", html="<p>Reset</p>", from_="Acme <security@example.com>", reply_to=["help@example.com"], capture_engagement=False, max_retries=0)
_ = (template_send, rendered_send)


async def async_email_types() -> None:
sent: SendEmailResult = await AsyncEmails("phs_example").send(to="user@example.com", template_key="welcome", subject="Hi", html="<p>Hi</p>")
_ = sent


async def offline_evaluation_types(
sync_client: OfflineEvaluations, async_client: AsyncOfflineEvaluations
Expand All @@ -64,15 +75,26 @@ async def offline_evaluation_types(
_ = config
PY

cat > "$tmp/invalid_offline_types.py" <<'PY'
cat > "$tmp/invalid_types.py" <<'PY'
# pyright: strict
from posthog.ai.evaluations import BooleanScorerConfig, CategoricalScorerConfig, NumericPassingRule, NumericScorerConfig, OfflineEvaluations
from posthog.emails import AsyncEmails, Emails

client = OfflineEvaluations(project_id=123, secret_key="phx_example")
NumericPassingRule(operator="gt", threshold=0.8) # expected-type-error
NumericScorerConfig(unknown_setting=True) # expected-type-error
CategoricalScorerConfig(selection_mode="single") # expected-type-error
client.scorers.create(name="Bad config", kind="numeric", config=BooleanScorerConfig(true_is_failure=True)) # expected-type-error
Emails("phs_example").send(to="user@example.com", template_id="0190f6d2-7c1e-7b3a-9f5e-1c2d3e4f5a6b", template_key="welcome", subject="Hi", html="<p>Hi</p>") # expected-type-error
Emails("phs_example").send(to="user@example.com", template_key="welcome", html="<p>Hi</p>") # expected-type-error
Emails("phs_example").send(to="user@example.com", template_id="0190f6d2-7c1e-7b3a-9f5e-1c2d3e4f5a6b", cc="team@example.com") # expected-type-error
Emails("phs_example").send(to="user@example.com", template_id="0190f6d2-7c1e-7b3a-9f5e-1c2d3e4f5a6b", capture_engagement=False) # expected-type-error
Emails("phs_example").send(to="user@example.com", template_key="welcome", subject="Hi", html="<p>Hi</p>", template_data={"name": "Ada"}) # expected-type-error
Emails("phs_example").send(to="user@example.com", template_key="welcome", subject="Hi", html="<p>Hi</p>", cc="team@example.com") # expected-type-error


async def invalid_async_email() -> None:
await AsyncEmails("phs_example").send(to="user@example.com", template_id="0190f6d2-7c1e-7b3a-9f5e-1c2d3e4f5a6b", subject="Hi") # expected-type-error
PY

"$tmp/.venv/bin/python" - <<'PY' > "$tmp/public_api_access.py"
Expand Down Expand Up @@ -116,20 +138,20 @@ JSON
cd "$tmp"
"$tmp/.venv/bin/python" -m pyright strict_posthog_types.py public_api_access.py

if "$tmp/.venv/bin/python" -m pyright --outputjson invalid_offline_types.py > invalid_types.json; then
echo "Invalid offline evaluation configurations unexpectedly passed type checking."
if "$tmp/.venv/bin/python" -m pyright --outputjson invalid_types.py > invalid_types.json; then
echo "Invalid offline evaluation configurations and email sends unexpectedly passed type checking."
exit 1
fi
"$tmp/.venv/bin/python" - <<'PY'
import json
from pathlib import Path

expected = {
index for index, line in enumerate(Path("invalid_offline_types.py").read_text().splitlines())
index for index, line in enumerate(Path("invalid_types.py").read_text().splitlines())
if "expected-type-error" in line
}
diagnostics = json.loads(Path("invalid_types.json").read_text())["generalDiagnostics"]
actual = {item["range"]["start"]["line"] for item in diagnostics if item["severity"] == "error"}
assert actual == expected, diagnostics
print("Offline evaluation configuration types reject invalid inputs.")
print("Offline evaluation configuration and email send types reject invalid inputs.")
PY
21 changes: 21 additions & 0 deletions .github/workflows/benchmark-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Python SDK benchmark report

on:
workflow_run:
workflows: ['Python SDK benchmarks']
types: [completed]

permissions: {}

jobs:
report:
permissions:
contents: read
actions: read
pull-requests: write
uses: PostHog/.github/.github/workflows/sdk-benchmark-report.yml@3322f26f21f088ad5e5960d65a916971e309ac0b # SDK benchmark workflow (PostHog/.github PR #84)
with:
workflow-path: .github/workflows/benchmarks.yml
artifact-name: python-benchmark-results
report-key: posthog-python
sdk: posthog-python
143 changes: 143 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Python SDK benchmarks

on: [pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
benchmark:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
shard: [flags-single, flags-scaling, flags-memory, capture]
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.12.12'

- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: '0.13.4'
enable-cache: true

- name: Prepare pinned baseline
env:
TARGET_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
export BASE_WORKTREE="$RUNNER_TEMP/python-benchmark-base"
export RESULTS="$RUNNER_TEMP/python-benchmark-results"
printf 'BASE_WORKTREE=%s\nRESULTS=%s\n' "$BASE_WORKTREE" "$RESULTS" >> "$GITHUB_ENV"
BASE_SHA=$(git merge-base "$TARGET_SHA" "$HEAD_SHA")
git worktree add --detach "$BASE_WORKTREE" "$BASE_SHA"
mkdir -p "$RESULTS"
python -c 'import json, os, pathlib, sys; pathlib.Path(os.environ["RESULTS"], "revisions.json").write_text(json.dumps({"target":os.environ["TARGET_SHA"], "head":os.environ["HEAD_SHA"], "base":sys.argv[1]}, indent=2))' "$BASE_SHA"

- name: Install isolated head and baseline wheels
run: |
python benchmarks/prepare.py .
python benchmarks/prepare.py "$BASE_WORKTREE"

- name: Test measurement controls and fixtures
run: .venv-benchmark/bin/python -B benchmarks/test_benchmarks.py

- name: Measure paired base and head
id: measure
timeout-minutes: 8
run: |
.venv-benchmark/bin/python -B benchmarks/run.py \
--base "$BASE_WORKTREE" \
--head "$GITHUB_WORKSPACE" \
--output "$RESULTS" \
--repetitions 6 \
--shard "${{ matrix.shard }}"

- name: Upload raw shard results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: benchmark-shard-${{ matrix.shard }}
path: |
${{ runner.temp }}/python-benchmark-results/base.json
${{ runner.temp }}/python-benchmark-results/head.json
${{ runner.temp }}/python-benchmark-results/revisions.json
if-no-files-found: warn
retention-days: 14

collect:
needs: benchmark
if: ${{ !cancelled() }}
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false

- name: Download shard results
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: benchmark-shard-*
path: ${{ runner.temp }}/python-benchmark-shards
merge-multiple: false

- name: Collect and render benchmark comparison
uses: PostHog/.github/.github/actions/benchmark-report@3322f26f21f088ad5e5960d65a916971e309ac0b # SDK benchmark reporting (PostHog/.github PR #84)
with:
mode: collect
source-status: ${{ needs.benchmark.result }}
shard-manifest: benchmarks/shards.json
shard-directory: ${{ runner.temp }}/python-benchmark-shards
output-directory: ${{ runner.temp }}/python-benchmark-report

- name: Upload rendered comparison
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: python-benchmark-report
path: |
${{ runner.temp }}/python-benchmark-report/report.md
${{ runner.temp }}/python-benchmark-report/comparison.json
if-no-files-found: ignore
retention-days: 14

- name: Upload raw benchmark results
if: always()
id: results
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: python-benchmark-results
path: |
${{ runner.temp }}/python-benchmark-report/bundle.json
${{ runner.temp }}/python-benchmark-report/revisions.json
if-no-files-found: warn
retention-days: 14

- name: Link results
if: always()
env:
ARTIFACT_URL: ${{ steps.results.outputs.artifact-url }}
run: |
printf '## Python SDK benchmark data\n\n' >> "$GITHUB_STEP_SUMMARY"
if [[ -n "$ARTIFACT_URL" ]]; then
printf '[Download paired measurements and execution metadata](%s)\n\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
fi
printf 'Measurements are informational. Check workload statuses before comparing values.\n' >> "$GITHUB_STEP_SUMMARY"
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
fetch-depth: 1

- name: Set up Python 3.11
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: 3.11

Expand All @@ -104,12 +104,12 @@ jobs:
fetch-depth: 1

- name: Set up Python 3.11
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: 3.11

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand All @@ -132,12 +132,12 @@ jobs:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand Down Expand Up @@ -179,12 +179,12 @@ jobs:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand Down Expand Up @@ -244,13 +244,13 @@ jobs:

- name: Set up Python 3.11
if: steps.changes.outputs.changed == 'true'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: 3.11

- name: Install uv
if: steps.changes.outputs.changed == 'true'
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -326,12 +326,12 @@ jobs:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand Down Expand Up @@ -381,12 +381,12 @@ jobs:
fetch-depth: 1

- name: Set up Python 3.12
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: 3.12

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.4"
enable-cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Initialize CodeQL
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
uses: github/codeql-action/init@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand All @@ -40,6 +40,6 @@ jobs:
trap-caching: false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
uses: github/codeql-action/analyze@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
with:
category: '/language:${{matrix.language}}'
Loading
Loading