public enum TelemetryProvider extends Enum<TelemetryProvider>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
io.opentelemetry.api.trace.Span |
createSpan(String spanName,
io.opentelemetry.api.common.Attributes attributes) |
<T> T |
createSpan(String spanName,
io.opentelemetry.api.common.Attributes attributes,
TracedFunction<T> tracedFunction) |
<T> T |
createSpan(String spanName,
io.opentelemetry.api.common.Attributes attributes,
WrappedValue<T> wrappedValue) |
void |
createSpan(String spanName,
io.opentelemetry.api.common.Attributes attributes,
WrappedVoid wrappedVoid) |
io.opentelemetry.api.OpenTelemetry |
getOpenTelemetry()
To use the openTelemetry instance directly without the helper functions
|
static TelemetryProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TelemetryProvider[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TelemetryProvider INSTANCE
public static TelemetryProvider[] values()
for (TelemetryProvider c : TelemetryProvider.values()) System.out.println(c);
public static TelemetryProvider valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic <T> T createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, TracedFunction<T> tracedFunction) throws Exception
spanName
- unique name of the spanattributes
- custom attributestracedFunction
- function called within the spanException
public <T> T createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedValue<T> wrappedValue) throws Exception
spanName
- unique name of the spanattributes
- custom attributeswrappedValue
- function called within the spanException
public void createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedVoid wrappedVoid) throws Exception
spanName
- unique name of the spanattributes
- custom attributeswrappedVoid
- function called within the spanException
public io.opentelemetry.api.OpenTelemetry getOpenTelemetry()
public io.opentelemetry.api.trace.Span createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes)
spanName
- attributes
-