Skip to content

Support standard OTel env vars for resource attributes and configurable session span name #4

Description

@steve-hibbert-cko

The plugin currently hardcodes service.name, service.version, and the session span name "Claude Code session", with no way to attach custom resource attributes. This makes it difficult to use in environments where multiple Claude Code sessions run as part of a larger system — for example, an orchestrator that runs several CC sessions in a single trace, or a CI/CD agent where you want to tag traces by environment or deployment.

Proposal:

  • Respect OTEL_RESOURCE_ATTRIBUTES (standard, covers all cases)
  • LOGFIRE_ENVIRONMENT → deployment.environment.name (convenience for Logfire users who already set this for the Python SDK)
  • OTEL_SERVICE_NAME to override service.name
  • LOGFIRE_SESSION_LABEL to override the session span name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions