Class AttributesExtractor<REQUEST,​RESPONSE>

    • Constructor Detail

      • AttributesExtractor

        public AttributesExtractor()
    • Method Detail

      • onStart

        protected abstract void onStart​(io.opentelemetry.api.common.AttributesBuilder attributes,
                                        REQUEST request)
        Extracts attributes from the AttributesExtractor into the AttributesBuilder at the beginning of a request.
      • onEnd

        protected abstract void onEnd​(io.opentelemetry.api.common.AttributesBuilder attributes,
                                      REQUEST request,
                                      @Nullable RESPONSE response)
        Extracts attributes from the AttributesExtractor and AttributesExtractor into the AttributesBuilder at the end of a request.
      • set

        protected static <T> void set​(io.opentelemetry.api.common.AttributesBuilder attributes,
                                      io.opentelemetry.api.common.AttributeKey<T> key,
                                      T value)
        Sets the value with the given key to the AttributesBuilder if value is not null.