public abstract static class TraceConfig.Builder extends ConfigBuilder<TraceConfig.Builder>
TraceConfig
.ConfigBuilder.NamingConvention
Modifier and Type | Method and Description |
---|---|
TraceConfig |
build()
Builds and returns a
TraceConfig with the desired values. |
protected TraceConfig.Builder |
fromConfigMap(Map<String,String> configMap,
ConfigBuilder.NamingConvention namingConvention)
Sets the configuration values from the given configuration map for only the available keys.
|
TraceConfig.Builder |
readEnvironmentVariables()
* Sets the configuration values from environment variables for only the available keys.
|
TraceConfig.Builder |
readProperties(Properties properties)
* Sets the configuration values from the given properties object for only the available keys.
|
TraceConfig.Builder |
readSystemProperties()
* Sets the configuration values from system properties for only the available keys.
|
abstract TraceConfig.Builder |
setMaxLengthOfAttributeValues(int maxLengthOfAttributeValues)
Sets the global default max length of string attribute value in characters.
|
abstract TraceConfig.Builder |
setMaxNumberOfAttributes(int maxNumberOfAttributes)
Sets the global default max number of attributes per
Span . |
abstract TraceConfig.Builder |
setMaxNumberOfAttributesPerEvent(int maxNumberOfAttributesPerEvent)
Sets the global default max number of attributes per
Event . |
abstract TraceConfig.Builder |
setMaxNumberOfAttributesPerLink(int maxNumberOfAttributesPerLink)
Sets the global default max number of attributes per
Link . |
abstract TraceConfig.Builder |
setMaxNumberOfEvents(int maxNumberOfEvents)
Sets the global default max number of
Event s per Span . |
abstract TraceConfig.Builder |
setMaxNumberOfLinks(int maxNumberOfLinks)
Sets the global default max number of
Link entries per Span . |
abstract TraceConfig.Builder |
setSampler(Sampler sampler)
Sets the global default
Sampler . |
TraceConfig.Builder |
setSamplerProbability(double samplerProbability)
Sets the global default
Sampler . |
getBooleanProperty, getDoubleProperty, getIntProperty, getLongProperty, getStringProperty
protected TraceConfig.Builder fromConfigMap(Map<String,String> configMap, ConfigBuilder.NamingConvention namingConvention)
fromConfigMap
in class ConfigBuilder<TraceConfig.Builder>
configMap
- Map
holding the configuration values.public TraceConfig.Builder readProperties(Properties properties)
readProperties
in class ConfigBuilder<TraceConfig.Builder>
properties
- Properties
holding the configuration values.public TraceConfig.Builder readEnvironmentVariables()
readEnvironmentVariables
in class ConfigBuilder<TraceConfig.Builder>
public TraceConfig.Builder readSystemProperties()
readSystemProperties
in class ConfigBuilder<TraceConfig.Builder>
public abstract TraceConfig.Builder setSampler(Sampler sampler)
sampler
- the global default Sampler
.public TraceConfig.Builder setSamplerProbability(double samplerProbability)
samplerProbability
- the global default probability used to make decisions on Span
sampling.public abstract TraceConfig.Builder setMaxNumberOfAttributes(int maxNumberOfAttributes)
Span
.maxNumberOfAttributes
- the global default max number of attributes per Span
. It
must be positive otherwise build()
will throw an exception.public abstract TraceConfig.Builder setMaxNumberOfEvents(int maxNumberOfEvents)
Event
s per Span
.maxNumberOfEvents
- the global default max number of Event
s per Span
. It
must be positive otherwise build()
will throw an exception.public abstract TraceConfig.Builder setMaxNumberOfLinks(int maxNumberOfLinks)
Link
entries per Span
.maxNumberOfLinks
- the global default max number of Link
entries per Span
. It must be positive otherwise build()
will throw an exception.public abstract TraceConfig.Builder setMaxNumberOfAttributesPerEvent(int maxNumberOfAttributesPerEvent)
Event
.maxNumberOfAttributesPerEvent
- the global default max number of attributes per Event
. It must be positive otherwise build()
will throw an exception.public abstract TraceConfig.Builder setMaxNumberOfAttributesPerLink(int maxNumberOfAttributesPerLink)
Link
.maxNumberOfAttributesPerLink
- the global default max number of attributes per Link
. It must be positive otherwise build()
will throw an exception.public abstract TraceConfig.Builder setMaxLengthOfAttributeValues(int maxLengthOfAttributeValues)
maxLengthOfAttributeValues
- the global default max length of string attribute value in
characters. It must be non-negative (or TraceConfig.UNLIMITED_ATTRIBUTE_LENGTH
) otherwise
build()
will throw an exception.public TraceConfig build()
TraceConfig
with the desired values.TraceConfig
with the desired values.IllegalArgumentException
- if any of the max numbers are not positive.