Class DataLoaderObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.graphql.observation.DataLoaderObservationContext
- All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView
public class DataLoaderObservationContext
extends io.micrometer.observation.Observation.Context
Context that holds information for metadata collection during observations
for
data loader operations.- Since:
- 1.4.0
- Author:
- Brian Clozel
-
Method Summary
Modifier and TypeMethodDescriptionorg.dataloader.DataLoader<?, ?> Return theDataLoaderbeing used for the operation.org.dataloader.BatchLoaderEnvironmentReturn theenvironmentgiven to the batch loading function.List<?> getKeys()Return the keys for loading by theDataLoader.List<?> Return the list of values resolved by theDataLoader, or an empty list if none were resolved.voidSet the list of resolved values by theDataLoader.Methods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextView
getOrDefault
-
Method Details
-
getDataLoader
public org.dataloader.DataLoader<?,?> getDataLoader()Return theDataLoaderbeing used for the operation. -
getKeys
Return the keys for loading by theDataLoader. -
getResult
Return the list of values resolved by theDataLoader, or an empty list if none were resolved. -
setResult
Set the list of resolved values by theDataLoader.- Parameters:
result- the values resolved by the data loader
-
getEnvironment
public org.dataloader.BatchLoaderEnvironment getEnvironment()Return theenvironmentgiven to the batch loading function.
-