Skip to content

posthog-react-native@4.56.3

Choose a tag to compare

@github-actions github-actions released this 15 Jul 15:55
Immutable release. Only release title and notes can be modified.
54b017c

4.56.3

Patch Changes

  • #4117 1eddff7 Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) to posthog-node — alpha

    Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:

    const client = new PostHog('phc_...', { metrics: { serviceName: '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). Pending metrics are flushed on shutdown(). Core gains _sendMetricsBatch on PostHogCoreStateless (same outcome contract as _sendLogsBatch) and a shared resolveMetricsConfig, so any core-based SDK can host PostHogMetrics. (2026-07-15)

  • Updated dependencies [1eddff7]:

    • @posthog/core@1.42.0