Class TraceUriGenerator
- java.lang.Object
-
- org.eclipse.ditto.services.utils.tracing.TraceUriGenerator
-
- All Implemented Interfaces:
Function<String,TraceInformation>
@Immutable public final class TraceUriGenerator extends Object implements Function<String,TraceInformation>
TraceUriGenerator generates a trace uri based on a specified path.The purpose of this class is to minimize the amount of requests to be logged (e. g. by shortening requests), in order to avoid the creation of too many Kamon traces (causing OutOfMemory).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TraceInformationapply(String path)Generates a trace URI based on the givenpath.booleanequals(Object o)inthashCode()StringtoString()
-
-
-
Method Detail
-
apply
public TraceInformation apply(String path)
Generates a trace URI based on the givenpath.- Specified by:
applyin interfaceFunction<String,TraceInformation>- Parameters:
path- the path.- Returns:
- the trace URI.
- Throws:
NullPointerException- ifpathisnull.
-
-