Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
TraceEvent.type
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Cache hit event for semantic caching
Cache hit event for semantic caching
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Cache miss event for semantic caching
Cache miss event for semantic caching
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CacheMissReason.type
Cache miss reason ADT
Cache miss reason ADT
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Tracks cost in USD for any model operation.
Tracks cost in USD for any model operation.
Value parameters
- costType
-
Category: "embedding", "completion", "total"
- costUsd
-
Estimated cost in US dollars
- model
-
Model name used for pricing lookup
- operation
-
Type of operation: "embedding", "completion", "evaluation"
- tokenCount
-
Total tokens consumed
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Tracks embedding token usage for cost analysis.
Tracks embedding token usage for cost analysis.
Value parameters
- 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"
- usage
-
Token usage statistics from embedding operation
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Tracks completion of a RAG operation with full metrics.
Tracks completion of a RAG operation with full metrics.
Value parameters
- durationMs
-
Wall-clock duration in milliseconds
- embeddingTokens
-
Optional token count for embedding operations
- llmCompletionTokens
-
Optional completion tokens for LLM operations
- llmPromptTokens
-
Optional prompt tokens for LLM operations
- operation
-
Type: "index", "search", "answer", "evaluate"
- totalCostUsd
-
Optional accumulated cost in USD
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass AnyShow all
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Builds a Langfuse "trace-create" batch-envelope object.
Builds a Langfuse "trace-create" batch-envelope object.
The resulting JSON is suitable for inclusion in the batch array sent to the Langfuse ingest endpoint. A new random UUID is generated for the outer envelope "id" on every call; the trace identity is carried by traceId. The "sessionId" field is derived from System.currentTimeMillis() and therefore reflects wall-clock time at call time, not the event timestamp.
Value parameters
- environment
-
Deployment environment label forwarded to Langfuse metadata
- messageCount
-
Conversation length forwarded to Langfuse metadata
- modelName
-
Model name forwarded to the Langfuse
"model"field - now
-
ISO-8601 timestamp string for both envelope and body
"timestamp"fields - release
-
Application release string forwarded to Langfuse metadata
- traceId
-
Stable identifier for the trace; correlates spans across calls
- traceInput
-
The user query or agent input recorded as the trace input
- traceOutput
-
The agent's final response recorded as the trace output
- version
-
Framework version string forwarded to Langfuse metadata