> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odigos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# PostHog

> Configuring the PostHog backend (Managed)

### Getting Started

![posthog](https://d15jtxgb40qetw.cloudfront.net/posthog.svg)

### Configuring Destination Fields

> [accordion] Supported Signals:
>
> ❌ Traces
> ✅ Metrics
> ✅ Logs
> ❌ Profiles

* **POSTHOG\_REGION** `string` : Region. Select the region of your PostHog project. Data is sent to [https://us.i.posthog.com](https://us.i.posthog.com) or [https://eu.i.posthog.com](https://eu.i.posthog.com).
  * This field is required and defaults to `us`
* **POSTHOG\_PROJECT\_TOKEN** `string` : Project Token. Use the project token from Project Settings, starting with phc\_. Personal API keys (phx\_) cannot be used for ingestion.
  * This field is required
  * Example: `phc_...`
* **POSTHOG\_COMPRESSION** `string` : Compression Type. Compression for OTLP/HTTP requests. Defaults to none.
  * This field is optional and defaults to `none`

> [!WARNING]
>
> Enable Logs and Application Metrics in your PostHog project before exporting. Application Metrics is in open alpha and its availability and ingestion requirements may change. Traces and profiles are not supported by this destination. Logs include OpenTelemetry severity, event timestamps, resource attributes and trace context; linking to product events or sessions requires application-specific IDs. PostHog normalizes severity text and assigns its own observed timestamp. Verify data in PostHog after setup: ingestion can return HTTP 200 even with an invalid project token.

### Adding Destination to Odigos

There are two primary methods for configuring destinations in Odigos:

##### **Using the UI**

**Step 1**

Use the [Odigos CLI](https://docs.odigos.io/cli/odigos_ui.md) to access the UI

```bash theme={null}
odigos ui
```

**Step 2**

Click on `Add Destination`, select `PostHog` and follow the on-screen instructions

##### **Using Kubernetes manifests**

**Step 1**

Save the YAML below to a file (e.g. `posthog.yaml`)

```yaml theme={null}
apiVersion: odigos.io/v1alpha1
kind: Destination
metadata:
  name: posthog-example
  namespace: odigos-system
spec:
  data:
    POSTHOG_REGION: '<Region (default: us) (options: [us, eu])>'
    # Note: The commented fields below are optional.
    # POSTHOG_COMPRESSION: <Compression Type (default: none) (options: [none, gzip])>
  destinationName: posthog
  secretRef:
    name: posthog-secret
  signals:
  - METRICS
  - LOGS
  type: posthog

---

apiVersion: v1
data:
  POSTHOG_PROJECT_TOKEN: <Base64 Project Token>
kind: Secret
metadata:
  name: posthog-secret
  namespace: odigos-system
type: Opaque
```

**Step 2**

Apply the YAML using `kubectl`

```bash theme={null}
kubectl apply -f posthog.yaml
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.