diff --git a/exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServer.java b/exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServer.java index f815ea0ac54..ed5f1f7c1b1 100644 --- a/exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServer.java +++ b/exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServer.java @@ -12,6 +12,7 @@ import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.common.export.MemoryMode; +import io.opentelemetry.sdk.internal.DaemonThreadFactory; import io.opentelemetry.sdk.metrics.InstrumentType; import io.opentelemetry.sdk.metrics.data.AggregationTemporality; import io.opentelemetry.sdk.metrics.export.CollectionRegistration; @@ -75,7 +76,8 @@ public static PrometheusHttpServerBuilder builder() { // we configure prometheus with a single thread executor such that requests are handled // sequentially. if (memoryMode == MemoryMode.REUSABLE_DATA) { - executor = Executors.newSingleThreadExecutor(); + executor = + Executors.newSingleThreadExecutor(new DaemonThreadFactory("prometheus-http-server")); } try { this.httpServer =