Class RequestContextExporterBuilder
java.lang.Object
com.linecorp.armeria.common.logging.RequestContextExporterBuilder
public final class RequestContextExporterBuilder extends Object
Builds a new
RequestContextExporter
.-
Method Summary
Modifier and Type Method Description RequestContextExporterBuilder
attr(String alias, AttributeKey<?> attrKey)
Adds the specifiedAttributeKey
to the export list.RequestContextExporterBuilder
attr(String alias, AttributeKey<?> attrKey, Function<?,String> stringifier)
Adds the specifiedAttributeKey
to the export list.RequestContextExporter
build()
Returns a newly-createdRequestContextExporter
instance.RequestContextExporterBuilder
builtIn(BuiltInProperty property)
Adds the specifiedBuiltInProperty
to the export list.RequestContextExporterBuilder
builtIn(BuiltInProperty property, String alias)
Adds the specifiedBuiltInProperty
to the export list.RequestContextExporterBuilder
exportGroup(ExportGroup exportGroup)
Adds the export group.RequestContextExporterBuilder
keyPattern(String keyPattern)
Adds the property represented by the specified key pattern to the export list.RequestContextExporterBuilder
prefix(String prefix)
Specifies a prefix of the default export group.RequestContextExporterBuilder
requestHeader(CharSequence headerName)
Adds the specified HTTP request header name to the export list.RequestContextExporterBuilder
requestHeader(CharSequence headerName, String alias)
Adds the specified HTTP request header name to the export list.RequestContextExporterBuilder
responseHeader(CharSequence headerName)
Adds the specified HTTP response header name to the export list.RequestContextExporterBuilder
responseHeader(CharSequence headerName, String alias)
Adds the specified HTTP response header name to the export list.
-
Method Details
-
builtIn
Adds the specifiedBuiltInProperty
to the export list. TheBuiltInProperty.key
will be used for the export key. -
builtIn
Adds the specifiedBuiltInProperty
to the export list. The specifiedalias
will be used for the export key. -
attr
Adds the specifiedAttributeKey
to the export list. The specifiedalias
is used for the export key.- Parameters:
alias
- the alias of the attribute to exportattrKey
- the key of the attribute to export
-
attr
public RequestContextExporterBuilder attr(String alias, AttributeKey<?> attrKey, Function<?,String> stringifier)Adds the specifiedAttributeKey
to the export list. The specifiedalias
is used for the export key. -
requestHeader
Adds the specified HTTP request header name to the export list. -
requestHeader
Adds the specified HTTP request header name to the export list. The specifiedalias
is used for the export key. -
responseHeader
Adds the specified HTTP response header name to the export list. -
responseHeader
Adds the specified HTTP response header name to the export list. The specifiedalias
is used for the export key. -
prefix
Specifies a prefix of the default export group. -
keyPattern
Adds the property represented by the specified key pattern to the export list. Please refer to the Logging contextual information in order to learn how to specify a key pattern. -
exportGroup
Adds the export group. -
build
Returns a newly-createdRequestContextExporter
instance.
-