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 Type
    Method
    Description
    org.dataloader.BatchLoaderEnvironment
    Return the environment given to the batch loading function.
    List<?>
    Return the keys for loading by the DataLoader.
    List<?>
    Return the list of values resolved by the DataLoader, or an empty list if none were resolved.
    void
    setResult(List<?> result)
    Set the list of resolved values by the DataLoader.

    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, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.micrometer.observation.Observation.ContextView

    getOrDefault
  • Method Details

    • getKeys

      public List<?> getKeys()
      Return the keys for loading by the DataLoader.
    • getResult

      public List<?> getResult()
      Return the list of values resolved by the DataLoader, or an empty list if none were resolved.
    • setResult

      public void setResult(List<?> result)
      Set the list of resolved values by the DataLoader.
      Parameters:
      result - the values resolved by the data loader
    • getEnvironment

      public org.dataloader.BatchLoaderEnvironment getEnvironment()
      Return the environment given to the batch loading function.