Class VertxMDCDataAttribute

  • All Implemented Interfaces:
    ExchangeAttribute

    public class VertxMDCDataAttribute
    extends Object
    implements ExchangeAttribute
    Provide entries from the MDC section of the RoutingContext. This is especially helpful to put OTel data 'traceId' and 'spanId' into the access log.
    • Constructor Detail

      • VertxMDCDataAttribute

        public VertxMDCDataAttribute​(String dataKey)
    • Method Detail

      • readAttribute

        public String readAttribute​(io.vertx.ext.web.RoutingContext exchange)
        Description copied from interface: ExchangeAttribute
        Resolve the attribute from the HTTP server exchange. This may return null if the attribute is not present.
        Specified by:
        readAttribute in interface ExchangeAttribute
        Parameters:
        exchange - The exchange
        Returns:
        The attribute