Skip to content

Langfuse OpenTelemetry example: env vars configuration issues with endpoint and auth header encoding #84

@dang-hai

Description

@dang-hai

Issue Description

The environment variable configuration in langfuse/env.example doesn't work as documented. There are two main issues:

1. Endpoint URL format

The current env.example suggests using:

OTEL_EXPORTER_OTLP_ENDPOINT="https://us.cloud.langfuse.com/"

However, this didn't work for me. The endpoint needs to point directly to the traces API:

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://us.cloud.langfuse.com/v1/traces"

2. Authorization header encoding

The documentation is unclear about the required encoding format for the OTEL_EXPORTER_OTLP_HEADERS variable.

The auth token must be base64 encoded in the format: base64(public_key:secret_key)

Without proper base64 encoding, authentication always fails with an "invalid auth header" error.

The env.example should clarify this requirement or provide an example like:

# Encode your keys: echo -n "public_key:secret_key" | base64
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic <base64_encoded_public_key:secret_key>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions