org.llm4s.trace.TraceEvent.EmbeddingUsageRecorded
See theEmbeddingUsageRecorded companion object
final case class EmbeddingUsageRecorded extends TraceEvent
Tracks embedding token usage for cost analysis. An org.llm4s.llmconnect.EmbeddingClient emits one per call, which a backend that follows the OpenTelemetry GenAI conventions reports as the call's embeddings <model> span (#2275).
Value parameters
- duration
-
how long the call took; the event's
timestampis its end - inputCount
-
Number of texts embedded in this operation
- model
-
Embedding model name (e.g., "text-embedding-3-small")
- operation
-
Type of operation: "indexing", "query", "evaluation"
- provider
-
the canonical id of the provider called (
openai,voyage, ...), when known - usage
-
Token usage statistics from embedding operation
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass Any
Members list
In this article