public RequestContextExporter build() {
        if (exportGroups == null) {
            final ExportGroup defaultExportGroup = defaultExportGroupBuilder.build();
            return new RequestContextExporter(
                    defaultExportGroup.builtIns(), defaultExportGroup.attrs(),
                    defaultExportGroup.reqHeaders(), defaultExportGroup.resHeaders());
        }

        final Builder<ExportEntry<BuiltInProperty>> builtInProperties = ImmutableSet.builder();
        final Builder<ExportEntry<AttributeKey<?>>> attrs = ImmutableSet.builder();
        final Builder<ExportEntry<AsciiString>> reqHeaders = ImmutableSet.builder();
        final Builder<ExportEntry<AsciiString>> resHeaders = ImmutableSet.builder();

        final List<ExportGroup> exportGroupList = new ArrayList<>(exportGroups);
        exportGroupList.add(defaultExportGroupBuilder.build());

        for (ExportGroup exportGroup : exportGroupList) {
            builtInProperties.addAll(exportGroup.builtIns());
            attrs.addAll(exportGroup.attrs());
            reqHeaders.addAll(exportGroup.reqHeaders());
            resHeaders.addAll(exportGroup.resHeaders());
        }

        return new RequestContextExporter(
                builtInProperties.build(), attrs.build(), reqHeaders.build(), resHeaders.build());
    }
Returns a newly-created {@link RequestContextExporter} instance.
core/src/main/java/com/linecorp/armeria/common/logging/RequestContextExporterBuilder.java