Class DefaultEmbeddingModelObservationConvention
java.lang.Object
org.springframework.ai.embedding.observation.DefaultEmbeddingModelObservationConvention
- All Implemented Interfaces:
io.micrometer.observation.KeyValuesConvention
,io.micrometer.observation.ObservationConvention<EmbeddingModelObservationContext>
,EmbeddingModelObservationConvention
public class DefaultEmbeddingModelObservationConvention
extends Object
implements EmbeddingModelObservationConvention
Default conventions to populate observations for embedding model operations.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Field Summary
Fields inherited from interface io.micrometer.observation.ObservationConvention
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected io.micrometer.common.KeyValue
protected io.micrometer.common.KeyValue
io.micrometer.common.KeyValues
io.micrometer.common.KeyValues
getName()
protected io.micrometer.common.KeyValues
requestEmbeddingDimension
(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context) protected io.micrometer.common.KeyValue
protected io.micrometer.common.KeyValue
protected io.micrometer.common.KeyValues
usageInputTokens
(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context) protected io.micrometer.common.KeyValues
usageTotalTokens
(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention
supportsContext
-
Field Details
-
DEFAULT_NAME
- See Also:
-
-
Constructor Details
-
DefaultEmbeddingModelObservationConvention
public DefaultEmbeddingModelObservationConvention()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceio.micrometer.observation.ObservationConvention<EmbeddingModelObservationContext>
-
getContextualName
- Specified by:
getContextualName
in interfaceio.micrometer.observation.ObservationConvention<EmbeddingModelObservationContext>
-
getLowCardinalityKeyValues
public io.micrometer.common.KeyValues getLowCardinalityKeyValues(EmbeddingModelObservationContext context) - Specified by:
getLowCardinalityKeyValues
in interfaceio.micrometer.observation.ObservationConvention<EmbeddingModelObservationContext>
-
aiOperationType
-
aiProvider
-
requestModel
-
responseModel
-
getHighCardinalityKeyValues
public io.micrometer.common.KeyValues getHighCardinalityKeyValues(EmbeddingModelObservationContext context) - Specified by:
getHighCardinalityKeyValues
in interfaceio.micrometer.observation.ObservationConvention<EmbeddingModelObservationContext>
-
requestEmbeddingDimension
protected io.micrometer.common.KeyValues requestEmbeddingDimension(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context) -
usageInputTokens
protected io.micrometer.common.KeyValues usageInputTokens(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context) -
usageTotalTokens
protected io.micrometer.common.KeyValues usageTotalTokens(io.micrometer.common.KeyValues keyValues, EmbeddingModelObservationContext context)
-