public Map<String, String> export(RequestContext ctx) {
        requireNonNull(ctx, "ctx");

        final State state = state(ctx);
        final RequestLogAccess log = ctx.log();
        boolean needsUpdate = false;

        // Needs to update if availabilityStamp has changed.
        // Also updates `State.availabilityStamp` while checking.
        final int availabilityStamp = log.availabilityStamp();
        if (state.availabilityStamp != availabilityStamp) {
            state.availabilityStamp = availabilityStamp;
            needsUpdate = true;
        }

        // Needs to update if any attributes have changed.
        // Also updates `State.attrValues` while scanning.
        if (attrs != null) {
            assert state.attrValues != null;
            for (int i = 0; i < attrs.length; i++) {
                final Object newValue = ctx.attr(attrs[i].key);
                if (!needsUpdate) {
                    final Object oldValue = state.attrValues[i];
                    needsUpdate = !Objects.equals(oldValue, newValue);
                }
                state.attrValues[i] = newValue;
            }
        }

        if (needsUpdate) {
            export(state, log.partial());
        }

        // Create a copy of 'state' to avoid the race between:
        // - the delegate appenders who iterate over the MDC map and
        // - this class who updates 'state'.
        return state.clone();
    }
Returns a {@link Map} whose key is an export key set through {@code add*()} in
{@link RequestContextExporterBuilder} and value is extracted from the specified {@link RequestContext}.
core/src/main/java/com/linecorp/armeria/common/logging/RequestContextExporter.java