use of io.opentelemetry.sdk.metrics.export.MetricExporter in project opentelemetry-java by open-telemetry.
the class OtlpExporterIntegrationTest method testOtlpGrpcMetricExport.
@ParameterizedTest
@ValueSource(strings = { "gzip", "none" })
void testOtlpGrpcMetricExport(String compression) {
MetricExporter otlpGrpcMetricExporter = OtlpGrpcMetricExporter.builder().setEndpoint("http://" + collector.getHost() + ":" + collector.getMappedPort(COLLECTOR_OTLP_GRPC_PORT)).setCompression(compression).build();
testMetricExport(otlpGrpcMetricExporter);
}
use of io.opentelemetry.sdk.metrics.export.MetricExporter in project opentelemetry-java by open-telemetry.
the class OtlpExporterIntegrationTest method testOtlpHttpMetricExport.
@ParameterizedTest
@ValueSource(strings = { "gzip", "none" })
void testOtlpHttpMetricExport(String compression) {
MetricExporter otlpGrpcMetricExporter = OtlpHttpMetricExporter.builder().setEndpoint("http://" + collector.getHost() + ":" + collector.getMappedPort(COLLECTOR_OTLP_HTTP_PORT) + "/v1/metrics").setCompression(compression).build();
testMetricExport(otlpGrpcMetricExporter);
}
Aggregations