Releases: PostHog/posthog-python
Release list
posthog-v7.27.0
Minor changes
-
5ef2c23
$feature_flag_calledevents are now minimized for non-experiment flags when the server enables it. When the/flagsv2 response (minimalFlagCalledEvents) or the local-evaluation payload (minimal_flag_called_events) reports the gate as enabled and the evaluated flag has no linked experiment (has_experimentisfalse), the event's properties are reduced to a strict allowlist ($feature_flag,$feature_flag_response,$feature_flag_has_experiment, the$feature_flag_*debug scalars,locally_evaluated,$groups,$process_person_profile,$session_id,$lib,$lib_version,$is_server,$geoip_disable,$os,$os_version,$os_distro,$python_runtime,$python_version). Everything else — including super properties and custom event properties — is stripped from those events.If the server does not report the gate, if the flag's
has_experimentsignal is missing, or if the flag is linked to an experiment, the full property set is sent unchanged. There is no SDK-side configuration; the gate is controlled per-team by the server. Forevaluate_flags()snapshots, the gate is pinned when the snapshot is created, so deferred flag accesses are shaped by the evaluation that produced them.Custom
flag_definition_cacheproviders now receive an additionalminimal_flag_called_eventskey in the definitions payload, so the gate survives external cache round-trips.When the server reports
has_experimentfor a flag, every$feature_flag_calledevent also carries a$feature_flag_has_experimentboolean property. — Thanks @haacked!
openfeature-provider-posthog-v0.1.14
Patch changes
- Updated dependencies: posthog@7.27.0
posthog-v7.26.0
Minor changes
- 1653bcb Add a
labeloption toPrompts.get()to fetch the prompt version a label (e.g.production) currently points to. Labeled fetches are cached separately, andPromptResultcarries the resolvedlabel. Requires a PostHog version with prompt labels; older servers ignore the parameter and return the latest version. — Thanks @jurajmajerik!
openfeature-provider-posthog-v0.1.13
Patch changes
- Updated dependencies: posthog@7.26.0
posthog-v7.25.0
Minor changes
- 5ab6318 Add the active OpenTelemetry span's
$trace_idand$span_idto events captured withcapture_exception. — Thanks @hpouillot!
openfeature-provider-posthog-v0.1.12
Patch changes
- Updated dependencies: posthog@7.25.0
posthog-v7.24.0
posthog-v7.23.0
Minor changes
-
5e42b1e Add the
posthog.metricsAPI (count,gauge,histogram) — alpha.Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
client = Posthog("<ph_project_api_key>", metrics={"service_name": "billing-worker"}) client.metrics.count("invoices.processed", 1, attributes={"plan": "pro"}) client.metrics.gauge("queue.depth", 42) client.metrics.histogram("job.duration", 187, unit="ms")
Samples aggregate in memory and flush as OTLP/JSON to
/i/v1/metrics(one data point per series per window, delta temporality). Pending metrics are flushed onshutdown(); buffered windows are retried on transient failures and dropped loudly after 3 consecutive failed flushes. Themetricsclient option acceptsservice_name,service_version,environment,resource_attributes,flush_interval(seconds),max_series_per_flush(cardinality guardrail, default 1000), and abefore_sendhook. — Thanks @DanielVisca!
openfeature-provider-posthog-v0.1.11
Patch changes
- Updated dependencies: posthog@7.24.0
openfeature-provider-posthog-v0.1.10
Patch changes
- Updated dependencies: posthog@7.23.0