Class BaseAttributeBinder


  • public abstract class BaseAttributeBinder
    extends Object
    Base class for instrumentation-specific attribute binding for traced methods.
    • Constructor Detail

      • BaseAttributeBinder

        public BaseAttributeBinder()
    • 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 be null to indicate that the parameter should not be bound to an attribute. The array may also be null to indicate that the method has no parameters to bind to attributes.
        Parameters:
        method - the traced method
        parameters - the method parameters
        Returns:
        an array of the attribute names