Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.4 KB
Raw Blame
receivers:
#__PROMETHEUS_RECEIVER__
#__GCP_RECEIVER__

processors:
    # Shed load instead of buffering unbounded memory when PostHog is unreachable.
    memory_limiter:
        check_interval: 1s
        limit_mib: 512
        spike_limit_mib: 128
    batch:
#__GCP_RESOURCE_PROCESSOR__

exporters:
#__DEBUG_EXPORTER__
    otlphttp:
        # The otlphttp exporter appends /v1/metrics to `endpoint`, but PostHog's
        # public ingest route is /i/v1/metrics, so pin the per-signal path.
        metrics_endpoint: '${env:POSTHOG_HOST:-https://us.i.posthog.com}${env:POSTHOG_INGEST_PATH:-/i/v1/metrics}'
        compression: gzip
        headers:
            authorization: 'Bearer ${env:POSTHOG_API_KEY}'
#__SENDING_QUEUE__
        retry_on_failure:
            enabled: true

extensions:
#__FILE_STORAGE__
    health_check:
        endpoint: 0.0.0.0:13133

service:
    # Expose the collector's own metrics (scrape health, queue depth, drops)
    # on :8888 so the agent is self-observable, the way vmagent exposes its.
    telemetry:
        metrics:
            readers:
                - pull:
                      exporter:
                          prometheus:
                              host: 0.0.0.0
                              port: 8888
    extensions: [__SERVICE_EXTENSIONS__]
    pipelines:
        metrics:
            receivers: [__PIPELINE_RECEIVERS__]
            processors: [__PIPELINE_PROCESSORS__]
            exporters: [__PIPELINE_EXPORTERS__]