Describe the bug
LoggingMetricExporter.toString() returns the constant "LoggingMetricExporter{}", hiding aggregationTemporality — the only setting this exporter has. An exporter created with DELTA and one created with the default CUMULATIVE print identically.
Steps to reproduce
System.out.println(LoggingMetricExporter.create()); // LoggingMetricExporter{}
System.out.println(LoggingMetricExporter.create(AggregationTemporality.DELTA)); // LoggingMetricExporter{}
What did you expect to see?
The configured temporality. OtlpGrpcMetricExporter, OtlpHttpMetricExporter, and OtlpStdoutMetricExporter all print theirs — including OtlpStdoutMetricExporter, a debug/stdout exporter like this one. #6402 ("Add missing fields to OTLP metric exporters") fixed exactly this for the OTLP metric exporters; LoggingMetricExporter was not updated.
What did you see instead?
The same string for both temporalities. This reaches real debug output: OpenTelemetrySdk.toString() prints the meter provider, and PeriodicMetricReader.toString() appends "exporter=" + exporter, so a config dump only shows exporter=LoggingMetricExporter{}.
Offending code: LoggingMetricExporter.toString() (exporters/logging/src/main/java/io/opentelemetry/exporter/logging/LoggingMetricExporter.java line 108-111).
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-logging
Version: main @ 63ebd94
How did you reference these artifacts? implementation("io.opentelemetry:opentelemetry-exporter-logging")
Environment
Compiler: Temurin 21
OS: N/A
Additional context
N/A
Describe the bug
LoggingMetricExporter.toString()returns the constant"LoggingMetricExporter{}", hidingaggregationTemporality— the only setting this exporter has. An exporter created withDELTAand one created with the defaultCUMULATIVEprint identically.Steps to reproduce
What did you expect to see?
The configured temporality.
OtlpGrpcMetricExporter,OtlpHttpMetricExporter, andOtlpStdoutMetricExporterall print theirs — includingOtlpStdoutMetricExporter, a debug/stdout exporter like this one. #6402 ("Add missing fields to OTLP metric exporters") fixed exactly this for the OTLP metric exporters;LoggingMetricExporterwas not updated.What did you see instead?
The same string for both temporalities. This reaches real debug output:
OpenTelemetrySdk.toString()prints the meter provider, andPeriodicMetricReader.toString()appends"exporter=" + exporter, so a config dump only showsexporter=LoggingMetricExporter{}.Offending code:
LoggingMetricExporter.toString()(exporters/logging/src/main/java/io/opentelemetry/exporter/logging/LoggingMetricExporter.java line 108-111).What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-logging
Version: main @ 63ebd94
How did you reference these artifacts?
implementation("io.opentelemetry:opentelemetry-exporter-logging")Environment
Compiler: Temurin 21
OS: N/A
Additional context
N/A