feat(tracing): provider-agnostic exporters with first-class PostHog support (#972)

* feat(tracing): add provider-agnostic exporters with first-class PostHog support

* chore(config): regenerate full reference rendered config for exporters

* refactor(tracing): drop posthog exporter 'enabled' flag per review
This commit is contained in:
Musa 2026-06-25 10:33:46 -07:00 committed by GitHub
parent ff4f2b95d6
commit cdde1adf0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 725 additions and 12 deletions

View file

@ -261,3 +261,16 @@ tracing:
static:
environment: production
service.team: platform
# Provider-agnostic export destinations. LLM spans are streamed to each of
# these in addition to any opentracing_grpc_endpoint above.
exporters:
# PostHog AI observability: each LLM call is captured as an $ai_generation event.
- type: posthog
# PostHog host. The /batch/ capture path is appended automatically.
url: https://us.i.posthog.com
# PostHog project API key (token). Supports $ENV_VAR expansion.
api_key: $POSTHOG_API_KEY
# Optional: request header used as the PostHog distinct_id. Omit for anonymous capture.
distinct_id_header: x-user-id
# Optional: include the (truncated) user message as $ai_input. Defaults to false.
capture_messages: false

View file

@ -266,6 +266,12 @@ system_prompt: 'You are a helpful assistant. Always respond concisely and accura
'
tracing:
exporters:
- api_key: $POSTHOG_API_KEY
capture_messages: false
distinct_id_header: x-user-id
type: posthog
url: https://us.i.posthog.com
opentracing_grpc_endpoint: http://localhost:4317
random_sampling: 100
span_attributes: