Class GrpcContextDataProvider

  • All Implemented Interfaces:
    org.apache.logging.log4j.core.util.ContextDataProvider

    public class GrpcContextDataProvider
    extends java.lang.Object
    implements org.apache.logging.log4j.core.util.ContextDataProvider
    Log4j2 ContextDataProvider inferring context from the Grpc context.

    This is used to propagate the context to the user code, such that log statements from the user will contain the restate logging context variables.

    This is based on grpc Context due to the fact that it's the only guaranteed thread local/context we can rely on that is always available in the user code.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> supplyContextData()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.logging.log4j.core.util.ContextDataProvider

        supplyStringMap
    • Constructor Detail

      • GrpcContextDataProvider

        public GrpcContextDataProvider()
    • Method Detail

      • supplyContextData

        public java.util.Map<java.lang.String,​java.lang.String> supplyContextData()
        Specified by:
        supplyContextData in interface org.apache.logging.log4j.core.util.ContextDataProvider