Class MdcContextProvider

  • All Implemented Interfaces:
    org.eclipse.microprofile.context.spi.ThreadContextProvider

    public class MdcContextProvider
    extends Object
    implements org.eclipse.microprofile.context.spi.ThreadContextProvider
    Implementation required for context propagation. This is responsible for moving the MDC configuration from one thread to another when context-propagation is being used. This is important for having correct log output when multitenancy is enabled
    Author:
    Fabian Martinez
    • Constructor Detail

      • MdcContextProvider

        public MdcContextProvider()
    • Method Detail

      • currentContext

        public org.eclipse.microprofile.context.spi.ThreadContextSnapshot currentContext​(Map<String,​String> props)
        Specified by:
        currentContext in interface org.eclipse.microprofile.context.spi.ThreadContextProvider
      • clearedContext

        public org.eclipse.microprofile.context.spi.ThreadContextSnapshot clearedContext​(Map<String,​String> props)
        Specified by:
        clearedContext in interface org.eclipse.microprofile.context.spi.ThreadContextProvider
      • getThreadContextType

        public String getThreadContextType()
        Specified by:
        getThreadContextType in interface org.eclipse.microprofile.context.spi.ThreadContextProvider