OfflineTracerConfig
Configuration for `OfflineTracer.create()`.
Configuration for OfflineTracer.create().
Properties
dataset
:Example[]
List that receives an Example for each completed root span.
exampleFields
:Record<string, unknown> | undefined
Fields included on every Example in dataset
(e.g. { input: ..., goldenOutput: ... }).
projectName
:string | undefined
Your Judgment project name. Required.
apiKey
:string | undefined
Judgment API key. Defaults to JUDGMENT_API_KEY env var.
organizationId
:string | undefined
Judgment organization ID. Defaults to JUDGMENT_ORG_ID env var.
apiUrl
:string | undefined
Judgment API URL. Defaults to JUDGMENT_API_URL env var.
environment
:string | undefined
Deployment environment name (e.g. "production").
setActive
:boolean | undefined
Whether to set this tracer as active. Defaults to true.
serializer
:((value: unknown) => string) | undefined
Custom serialization function for span attribute values.
resourceAttributes
:Record<string, string> | undefined
Additional OpenTelemetry resource attributes.
sampler
:Sampler | undefined
Custom OpenTelemetry sampler.
spanLimits
:SpanLimits | undefined
Custom OpenTelemetry span limits.
spanProcessors
:SpanProcessor[] | undefined
Additional OpenTelemetry span processors.
OfflineTracer
Tracer for offline / experiment-style runs. Behaves like `Tracer` for span creation and `@Tracer.observe`, with two differences: * Spans are pushed to the project's *offline* OTLP endpoint and stored in the `offline_otel_traces` ClickHouse table. They do **not** appear on the live monitoring page. * Each completed root span produces a new `Example` that is appended to the caller-supplied `dataset` list. The example carries the `offline_trace_id` of the offline trace plus any static `exampleFields` configured at init time. Unlike `Tracer`, `OfflineTracer` requires all credentials upfront and throws if any are missing — there is no no-op fallback. Prefer `judgeval.offlineTracer({ ... })` over calling `OfflineTracer.create` directly so credentials are reused from the active `Judgeval` client.
ObserveOptions
Options for BaseTracer.observe.
Last updated on