Package io.micrometer.registry.otlp
Class OtlpHttpMetricsSender
java.lang.Object
io.micrometer.registry.otlp.OtlpHttpMetricsSender
- All Implemented Interfaces:
OtlpMetricsSender
An implementation of
OtlpMetricsSender that uses an HttpSender.- Since:
- 1.15.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.registry.otlp.OtlpMetricsSender
OtlpMetricsSender.Request -
Constructor Summary
ConstructorsConstructorDescriptionOtlpHttpMetricsSender(io.micrometer.core.ipc.http.HttpSender httpSender) Metrics sender using the givenHttpSender. -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(OtlpMetricsSender.Request request) Send a batch of OTLP Protobuf format metrics to an OTLP HTTP receiver.
-
Constructor Details
-
OtlpHttpMetricsSender
public OtlpHttpMetricsSender(io.micrometer.core.ipc.http.HttpSender httpSender) Metrics sender using the givenHttpSender.- Parameters:
httpSender- client to use to send metrics
-
-
Method Details
-
send
Send a batch of OTLP Protobuf format metrics to an OTLP HTTP receiver.- Specified by:
sendin interfaceOtlpMetricsSender- 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
-