Skip to content

Add environment field support to traces and observations #4

Description

@isaka1022

What

Pass an environment field in trace-create and observation-create ingestion event bodies, in line with the current Langfuse API schema.

Why

Langfuse added environment as a first-class field to distinguish production, staging, and development traffic within the same project. Without it, all events land in the default environment and users cannot filter by deployment stage in the Langfuse UI. This is a low-cost addition that improves practical usability.

Effort estimate

S (half day) — add the field to create and update payloads in Traces and Observations clients, expose it in the configuration DSL or per-call kwargs, and add spec coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    nowHigh priority - next uproadmapPlanned roadmap item

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions