Package org.eclipse.hono.util
Class TenantTracingConfig
java.lang.Object
org.eclipse.hono.util.TenantTracingConfig
A tenant specific tracing configuration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal TracingSamplingMode
Gets the sampling mode that defines in how far spans created when processing messages for a tenant shall be recorded (sampled) by the tracing system.final TracingSamplingMode
getSamplingMode
(String authId) Gets the sampling mode for a specific device.Gets the sampling modes defined for specific devices.final TenantTracingConfig
setSamplingMode
(TracingSamplingMode samplingMode) Sets the sampling mode that defines in how far spans created when processing messages for a tenant shall be recorded (sampled) by the tracing system.setSamplingModePerAuthId
(Map<String, TracingSamplingMode> samplingModePerAuthId) Sets the sampling modes defined for specific devices.
-
Constructor Details
-
TenantTracingConfig
public TenantTracingConfig()
-
-
Method Details
-
getSamplingMode
Gets the sampling mode that defines in how far spans created when processing messages for a tenant shall be recorded (sampled) by the tracing system.- Returns:
- The sampling mode or
null
if not set.
-
setSamplingMode
Sets the sampling mode that defines in how far spans created when processing messages for a tenant shall be recorded (sampled) by the tracing system.- Parameters:
samplingMode
- The sampling mode.- Returns:
- This instance for command chaining.
-
getSamplingModePerAuthId
Gets the sampling modes defined for specific devices.The sampling mode for a specific device overrides the value returned by
getSamplingMode()
.- Returns:
- An unmodifiable view on the device specific sampling modes. The returned map contains authentication identifiers as keys.
-
setSamplingModePerAuthId
public TenantTracingConfig setSamplingModePerAuthId(Map<String, TracingSamplingMode> samplingModePerAuthId) Sets the sampling modes defined for specific devices.The sampling mode for a specific device overrides the value returned by
getSamplingMode()
.- Parameters:
samplingModePerAuthId
- The device specific sampling modes. The map must contain authentication identifiers as keys.- Returns:
- This instance for command chaining.
-
getSamplingMode
Gets the sampling mode for a specific device.- Parameters:
authId
- The authentication identity of the device.- Returns:
- The sampling mode set for the device or
the default sampling mode if no mode has been set for the device or
null
if no default sampling mode has been set.
-