Skip to content

[Feature] Add observability support (LangSmith / OpenTelemetry) #1434

@mbhassan

Description

@mbhassan

Summary

Add tracing and observability for LLM calls, so users can monitor, debug and evaluate agentic workflows without relying on print statements or guesswork.

Problem / goal

When running agentic workflows there is no way to observe, trace or debug LLM calls. This makes it impossible to diagnose failures, measure latency, track token usage, or compare prompt versions over time.

Primary user(s)

  • Bob (IT / power user)
  • Susan (non-technical)
  • Other team roles

OpenCode primitive alignment

session.*, mcp (tracing hooks), skills/plugins (evaluation wrappers)

Alignment with VISION/PRINCIPLES/PRODUCT

Observability is a core need for any production-grade agentic tool. Teams cannot responsibly deploy agents without visibility into what they are doing. This directly supports the product's goal of being enterprise-ready.

Testability

pnpm dev + run a multi-step agent task + verify traces appear in LangSmith or OTEL backend (e.g. Jaeger running locally via Docker)

Ready to build it yourself?

Yes

Additional context

Two integration paths to consider:

  • LangSmith: direct integration for trace logging, prompt versioning and evaluation dashboards
  • OpenTelemetry (OTEL): vendor-neutral open standard routing traces to any compatible backend (Jaeger, Honeycomb, Grafana Tempo etc.)

Even a lightweight OTEL exporter hook would be a great starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    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