Releases: PostHog/posthog-rs
0.13.1
Patch changes
- 8a291b6 Send the default SDK User-Agent on V0 capture requests. — Thanks @marandaneto!
0.13.0
Minor changes
- 84d06a1 Requests now use a client-specific user-agent — Thanks @marandaneto!
0.12.0
0.11.0
Minor changes
- b84ec43 Add OS runtime context properties to captured events. — Thanks @marandaneto!
- dba50e1 Add before_send hooks for mutating or dropping events before capture. — Thanks @marandaneto!
0.10.2
Patch changes
- 7131402
capture_batchwith an empty event list is now a no-op on both clients and
both capture paths — no HTTP request is sent (the v1 backend rejects empty
batches). Also derivesDebugfor the internal retryStepand pins that a
body-less 2xx response is a terminal serialization error, not a retry. — Thanks @eli-r-ph!
0.10.1
Patch changes
-
4a6c67c Three fixes to the unstable
capture-v1pipeline (off by default):- Accept any 2xx HTTP status as success on V1 capture responses instead of exactly 200, so a future 201/202/207 from capture is not misclassified as a connection error. Malformed bodies on 2xx still surface as
Error::Serialization. - Send the canonical SDK identity
posthog-rs/<version>(previouslyposthog-rust/<version>) in theposthog-sdk-infoanduser-agentheaders. The name segment now matches the$libvalue the v0 path sends, so capture-side$lib/$lib_versionmaterialization attributes V1 traffic correctly in SDK Health, usage reports, and Library columns. - Route
$feature_flag_calledevents through the V1 analytics endpoint whencapture-v1is enabled (previously they always took the legacy v0 path, splitting the pipeline). Shipping stays fire-and-forget with a single attempt and no retry loop, matching the v0 flag-event semantics on both the async and blocking clients. — Thanks @eli-r-ph!
- Accept any 2xx HTTP status as success on V1 capture responses instead of exactly 200, so a future 201/202/207 from capture is not misclassified as a connection error. Malformed bodies on 2xx still surface as
0.10.0
Minor changes
-
b4a60a7 feat(feature-flags): support
early_exitin local evaluationAdds support for the
early_exitoption on a feature flag'sfiltersduring local evaluation. Whenearly_exitistrueand a condition group's property filters match (or it has no property filters) but the rollout percentage excludes the user, evaluation now stops and returns a definitive disabled result instead of falling through to later condition groups. A property-filter mismatch always falls through, regardless ofearly_exit. The flag defaults tofalse(absent), preserving the existing fall-through behavior. This mirrors the PostHog Rust evaluation engine and the posthog-node/posthog-python implementations. — Thanks @gustavohstrassburger!
0.9.1
Patch changes
-
f757768 Serialize the v0 capture
distinct_idat the event root (canonical field) instead of the legacy$distinct_idalias, matching v1 and the v0 ingestion contract. Add retries to the v0 capture paths: transport errors and 408/500/502/503/504 are retried with exponential backoff honoringRetry-After, and a 429 is retried only when it carries aRetry-After(a bare 429 stays a terminal rate-limit). Retried requests resend the same bytes, preserving the event UUID and timestamp that dedup relies on. Add opt-in gzip compression for v0 capture viacapture_compression: the body is gzipped with aContent-Encoding: gzipheader and acompression=gzipquery param (capture reads the query param on v0).Fix the retry backoff timing on both v0 and v1: the first retry now waits exactly
retry_initial_backoff_msinstead of double it (the call sites previously passedattempt + 1into the backoff calculation, skipping the configured initial delay). — Thanks @eli-r-ph!
0.9.0
Minor changes
- 79673c3 Add V1 capture pipeline (
/i/v1/analytics/events/) behind the unstablecapture-v1Cargo feature (off by default). Includes gzip/deflate/br/zstd compression, automatic partial-batch retry with exponential backoff, per-event options (cookieless mode, skew correction, person profile, product tour), and historical migration support. A separatetest-harnessfeature enables injecting extra request headers for compliance test isolation. — Thanks @eli-r-ph for your first contribution 🎉!
0.8.0
Minor changes
- edd3797 Add a configurable
$is_serverevent property (defaulttrue) so PostHog can identify server-side events. Setis_servertofalsewhen using posthog-rs as a client/CLI so the device OS is attributed normally. — Thanks @turnipdabeets for your first contribution 🎉!