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
addAttribute(String alias, AttributeKey<?> attrKey)
Adds the specifiedAttributeKey
to the export list.RequestContextExporterBuilder
addAttribute(String alias, AttributeKey<?> attrKey, Function<?,String> stringifier)
Adds the specifiedAttributeKey
to the export list.RequestContextExporterBuilder
addBuiltIn(BuiltInProperty property)
Adds the specifiedBuiltInProperty
to the export list.RequestContextExporterBuilder
addBuiltIn(BuiltInProperty property, String alias)
Adds the specifiedBuiltInProperty
to the export list.RequestContextExporterBuilder
addKeyPattern(String keyPattern)
Adds the property represented by the specified key pattern to the export list.RequestContextExporterBuilder
addRequestHeader(CharSequence headerName)
Adds the specified HTTP request header name to the export list.RequestContextExporterBuilder
addRequestHeader(CharSequence headerName, String alias)
Adds the specified HTTP request header name to the export list.RequestContextExporterBuilder
addResponseHeader(CharSequence headerName)
Adds the specified HTTP response header name to the export list.RequestContextExporterBuilder
addResponseHeader(CharSequence headerName, String alias)
Adds the specified HTTP response header name to the export list.RequestContextExporter
build()
Returns a newly-createdRequestContextExporter
instance.
-
Method Details
-
addBuiltIn
Adds the specifiedBuiltInProperty
to the export list. TheBuiltInProperty.key
will be used for the export key. -
addBuiltIn
Adds the specifiedBuiltInProperty
to the export list. The specifiedalias
will be used for the export key. -
addAttribute
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
-
addAttribute
public RequestContextExporterBuilder addAttribute(String alias, AttributeKey<?> attrKey, Function<?,String> stringifier)Adds the specifiedAttributeKey
to the export list. The specifiedalias
is used for the export key. -
addRequestHeader
Adds the specified HTTP request header name to the export list. -
addRequestHeader
Adds the specified HTTP request header name to the export list. The specifiedalias
is used for the export key. -
addResponseHeader
Adds the specified HTTP response header name to the export list. -
addResponseHeader
Adds the specified HTTP response header name to the export list. The specifiedalias
is used for the export key. -
addKeyPattern
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. -
build
Returns a newly-createdRequestContextExporter
instance.
-