Skip to main content
Glassray connects to PostHog as a pull integration: you provide a personal API key, region, and project, and Glassray fetches new traces on a sync cadence. It reads your LLM observability ($ai_*) events, so your app needs to be sending them with the PostHog AI SDK. It’s one of four trace integrations - the others are Langfuse, LangSmith, and OpenTelemetry.

Connect

Open Sources

In the dashboard, go to Settings → Sources and add PostHog.

Create a personal API key

In PostHog, go to Settings → Personal API keys and create a new key. When selecting scopes, search for query and set the Query scope to Read (query:read).
PostHog scope picker - search for query and select Read
Paste the key into Glassray and choose your region (US or EU). If you’re self-hosted, enter your host URL instead.

Enter your project ID

Enter the PostHog project ID to pull traces from. You can find it in PostHog under Settings → General.

Glassray verifies and syncs

Glassray verifies the credentials and starts pulling new traces on a cadence.
Your PostHog credentials are stored in WorkOS Vault, never in Glassray’s database. The connected source row only holds a reference to the vaulted secret.

Filtering

A source can carry an optional filter so only the runs you care about are pulled - narrow by trace name and scope. Filtering is applied at ingest, and changes are go-forward (re-sync to apply a new filter). See Traces.
Prefer to push instead of pull? Use OpenTelemetry. Once traces land, head to Flows or Ask Glassray.