Other languages logs installation
Logs is in beta
Logs is free to use whilst in beta, though we'd love to hear your feedback in app.
PostHog logs works with any OpenTelemetry-compatible client. Check the OpenTelemetry documentation for your specific language or framework.
- 1
Install OpenTelemetry packages
RequiredThe key requirements are:
- Use OTLP (OpenTelemetry Protocol) for log export over HTTP
- Send logs to
https://us.i.posthog.com/i/v1/logs(or your self-hosted endpoint) - Include your project API key in the Authorization header or as a
?token=query parameter
Find the OpenTelemetry SDK for your language in the official registry.
- 2
Get your project API key
RequiredYou'll need your PostHog project API key to authenticate log requests. This is the same API key you use for capturing events and exceptions.
You can find your project API key in Project Settings.
- 3
Configure the SDK
RequiredConfigure your OpenTelemetry SDK to send logs to PostHog:
- Endpoint:
https://us.i.posthog.com/i/v1/logs - Authentication: Include your project API key either:
- In the Authorization header:
Bearer {your-project-api-key} - As a query parameter:
?token={your-project-api-key}
- In the Authorization header:
- Endpoint:
- 4
Next steps
CheckpointWhat you can do with your logs