INNER CODE UNIT · Java

createBaggageInScope

micrometer-metrics/tracing · micrometer-tracing/src/main/java/io/micrometer/tracing/BaggageManager.java:133

    default BaggageInScope createBaggageInScope(String name, String value) {
        return createBaggage(name).makeCurrent(value);
    }

    /**
     * Creates a new {@link Baggage} entry, sets a value on it and puts it in scope.
     * @param traceContext trace context with baggage attached to it
     * @param name baggage name
     * @param value baggage value
     * @return baggage with value
     */
    default BaggageInScope createBaggageInScope(TraceContext traceContext, String name, String value) {
        return createBaggage(name).makeCurrent(traceContext, value);
    }

    /**
     * Returns all names of baggage fields.
     * @return baggage fields

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…