Package org.languagetool.tools
Enum Class TelemetryProvider
- All Implemented Interfaces:
Serializable,Comparable<TelemetryProvider>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.opentelemetry.api.OpenTelemetryprivate final io.opentelemetry.api.trace.Tracer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.api.trace.SpancreateSpan(String spanName, io.opentelemetry.api.common.Attributes attributes) <T> TcreateSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, TracedFunction<T> tracedFunction) <T> TcreateSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedValue<T> wrappedValue) voidcreateSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedVoid wrappedVoid) io.opentelemetry.api.OpenTelemetryTo use the openTelemetry instance directly without the helper functionsstatic TelemetryProviderReturns the enum constant of this class with the specified name.static TelemetryProvider[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
openTelemetry
private final io.opentelemetry.api.OpenTelemetry openTelemetry -
tracer
private final io.opentelemetry.api.trace.Tracer tracer
-
-
Constructor Details
-
TelemetryProvider
private TelemetryProvider()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
createSpan
public <T> T createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, TracedFunction<T> tracedFunction) throws Exception - Parameters:
spanName- unique name of the spanattributes- custom attributestracedFunction- function called within the span- Returns:
- the return value of wrappedValue function
- Throws:
Exception- Since:
- 6.2 * @param spanName
-
createSpan
public <T> T createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedValue<T> wrappedValue) throws Exception - Parameters:
spanName- unique name of the spanattributes- custom attributeswrappedValue- function called within the span- Returns:
- the return value of wrappedValue function
- Throws:
Exception- Since:
- 6.2 * @param spanName
-
createSpan
public void createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes, WrappedVoid wrappedVoid) throws Exception - Parameters:
spanName- unique name of the spanattributes- custom attributeswrappedVoid- function called within the span- Throws:
Exception- Since:
- 6.2
-
getOpenTelemetry
public io.opentelemetry.api.OpenTelemetry getOpenTelemetry()To use the openTelemetry instance directly without the helper functions- Returns:
- a opentelemetry instance
- Since:
- 6.2
-
createSpan
public io.opentelemetry.api.trace.Span createSpan(String spanName, io.opentelemetry.api.common.Attributes attributes) - Parameters:
spanName-attributes-- Returns:
- a Span
- Since:
- 6.2
-