TracingMiddleware#

class langsmith.middleware.TracingMiddleware(app)[source]#

Middleware for propagating distributed tracing context using LangSmith.

This middleware checks for the ‘langsmith-trace’ header and propagates the tracing context if present. It does not start new traces by default. It is designed to work with ASGI applications.

app#

The ASGI application being wrapped.

Initialize the middleware.

Methods

__init__(app)

Initialize the middleware.

__init__(app)[source]#

Initialize the middleware.