Class BaseAttributeBinder
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.annotation.support.BaseAttributeBinder
-
public abstract class BaseAttributeBinder extends Object
Base class for instrumentation-specific attribute binding for traced methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBaseAttributeBinder.EmptyAttributeBindings
-
Constructor Summary
Constructors Constructor Description BaseAttributeBinder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @Nullable String[]attributeNamesForParameters(Method method, Parameter[] parameters)Returns an array of the names of the attributes for the parameters of the traced method.AttributeBindingsbind(Method method)Creates a binding of the parameters of the traced method to span attributes.
-
-
-
Method Detail
-
bind
public AttributeBindings bind(Method method)
Creates a binding of the parameters of the traced method to span attributes.- Parameters:
method- the traced method- Returns:
- the bindings of the parameters
-
attributeNamesForParameters
protected abstract @Nullable String[] attributeNamesForParameters(Method method, Parameter[] parameters)
Returns an array of the names of the attributes for the parameters of the traced method. The array should be the same length as the array of the method parameters. An element may benullto indicate that the parameter should not be bound to an attribute. The array may also benullto indicate that the method has no parameters to bind to attributes.- Parameters:
method- the traced methodparameters- the method parameters- Returns:
- an array of the attribute names
-
-