Class OtlpHttpMetricsSender

java.lang.Object
io.micrometer.registry.otlp.OtlpHttpMetricsSender
All Implemented Interfaces:
OtlpMetricsSender

public class OtlpHttpMetricsSender extends Object implements OtlpMetricsSender
An implementation of OtlpMetricsSender that uses an HttpSender.
Since:
1.15.0
  • Constructor Details

    • OtlpHttpMetricsSender

      public OtlpHttpMetricsSender(io.micrometer.core.ipc.http.HttpSender httpSender)
      Metrics sender using the given HttpSender.
      Parameters:
      httpSender - client to use to send metrics
  • Method Details

    • send

      public void send(OtlpMetricsSender.Request request) throws Exception
      Send a batch of OTLP Protobuf format metrics to an OTLP HTTP receiver.
      Specified by:
      send in interface OtlpMetricsSender
      Parameters:
      request - metrics request to publish
      Throws:
      Exception - when there is an exception in sending the metrics; the caller should handle this in some way such as logging the exception