Class OtlpJsonLoggingMetricExporter
java.lang.Object
io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingMetricExporter
- All Implemented Interfaces:
io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector,io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector,io.opentelemetry.sdk.metrics.export.MetricExporter,Closeable,AutoCloseable
public final class OtlpJsonLoggingMetricExporter
extends Object
implements io.opentelemetry.sdk.metrics.export.MetricExporter
A
MetricExporter which writes spans to a Logger in OTLP
JSON format. Each log line will include a single ResourceMetrics.-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.sdk.metrics.export.MetricExportercreate()Returns a newOtlpJsonLoggingMetricExporterwith a aggregation temporality ofAggregationTemporality.CUMULATIVE.static io.opentelemetry.sdk.metrics.export.MetricExportercreate(io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality) Returns a newOtlpJsonLoggingMetricExporterwith the givenaggregationTemporality.io.opentelemetry.sdk.common.CompletableResultCodeexport(Collection<io.opentelemetry.sdk.metrics.data.MetricData> metrics) io.opentelemetry.sdk.common.CompletableResultCodeflush()io.opentelemetry.sdk.metrics.data.AggregationTemporalitygetAggregationTemporality(io.opentelemetry.sdk.metrics.InstrumentType instrumentType) io.opentelemetry.sdk.metrics.data.AggregationTemporalityDeprecated.io.opentelemetry.sdk.common.CompletableResultCodeshutdown()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector
withMethods inherited from interface io.opentelemetry.sdk.metrics.export.MetricExporter
close, getDefaultAggregation, getMemoryMode
-
Method Details
-
create
public static io.opentelemetry.sdk.metrics.export.MetricExporter create()Returns a newOtlpJsonLoggingMetricExporterwith a aggregation temporality ofAggregationTemporality.CUMULATIVE. -
create
public static io.opentelemetry.sdk.metrics.export.MetricExporter create(io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality) Returns a newOtlpJsonLoggingMetricExporterwith the givenaggregationTemporality. -
getPreferredTemporality
@Deprecated public io.opentelemetry.sdk.metrics.data.AggregationTemporality getPreferredTemporality()Deprecated.Return the aggregation temporality. -
getAggregationTemporality
public io.opentelemetry.sdk.metrics.data.AggregationTemporality getAggregationTemporality(io.opentelemetry.sdk.metrics.InstrumentType instrumentType) - Specified by:
getAggregationTemporalityin interfaceio.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector
-
export
public io.opentelemetry.sdk.common.CompletableResultCode export(Collection<io.opentelemetry.sdk.metrics.data.MetricData> metrics) - Specified by:
exportin interfaceio.opentelemetry.sdk.metrics.export.MetricExporter
-
flush
public io.opentelemetry.sdk.common.CompletableResultCode flush()- Specified by:
flushin interfaceio.opentelemetry.sdk.metrics.export.MetricExporter
-
shutdown
public io.opentelemetry.sdk.common.CompletableResultCode shutdown()- Specified by:
shutdownin interfaceio.opentelemetry.sdk.metrics.export.MetricExporter
-
getAggregationTemporality(InstrumentType).