langprobe
Python SDK

API reference

The public symbols exported from the langprobe package.

Everything below is importable from the top-level langprobe package.

Tracing

SymbolWhat it is
traceDecorator — @trace or @trace(kind=..., name=..., tags=[...]). Turns a function call into a run (or a nested span).
spanContext manager — with span(name, kind=...). A span within the active @trace; a safe no-op outside one.
identifyContext manager — with identify(end_user_id=..., session_id=..., end_user_metadata=...). Declares session / end-user identity for root spans in scope.
initinit(*, api_key=None, endpoint=None, instrumentations=None, service_name=None, processor="batch", ...) — wire OpenTelemetry + OpenInference and export to /v1/traces. Requires the otel extra.
shutdownFlush and tear down the provider created by init().

Client

SymbolWhat it is
LangprobeClientLangprobeClient(endpoint, api_key, ...) — the top-level client. Exposes .ingest (write) and .control (read), plus .runs / .threads / .datasets / .prompts / .evals / .poll.
IngestClientThe write-path client (send runs and spans). Also reachable as client.ingest.

Models

SymbolWhat it is
IngestRunA run to send on the ingest path.
IngestSpanA span within a run.
IngestBatchA batch of runs + spans for a single POST.

Errors

SymbolWhat it is
LangprobeErrorBase exception for SDK errors.
LangprobeHTTPErrorRaised on a non-2xx response; carries the HTTP status.

Integrations

Imported from submodules (install the matching extra):

  • langprobe.integrations.langchain.LangprobeCallbackHandler
  • langprobe.integrations.langsmith.Client, langprobe.integrations.langsmith.traceable

See LangChain & LangSmith.

On this page