ExperimentalThe function type being wrapped, preserving original signature
The function to wrap with RERANKER span tracing
Optionaloptions: Omit<SpanTraceOptions<AnyFn>, "kind">Configuration options for tracing behavior (excluding kind)
Custom OpenTelemetry tracer instance (otherwise the current global tracer provider is resolved when the wrapper is invoked)
Custom span name (defaults to function name)
OpenTelemetry span kind (defaults to INTERNAL)
Custom function to process input arguments into attributes
Custom function to process output values into attributes
Base attributes to be added to every span created
A wrapped function with identical signature that creates RERANKER spans during execution
Wraps a function with tracing capabilities, specifically marking it as a RERANKER span.
This is a convenience function that wraps
withSpanwith the OpenInference span kind pre-configured to RERANKER. Reranker spans represent operations that reorder or score a set of candidate documents by relevance to a query, commonly used to refine the results returned by a retriever before passing them to a language model.This API is experimental and may change in future versions