From 8d27e24b213aa12fdb743eea6b18d385fee9c822 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Thu, 28 Sep 2023 11:30:49 -0400 Subject: [PATCH] Unify `queueSize` metric description and attribute (#5836) --- CHANGELOG.md | 3 +++ .../sdk/logs/export/BatchLogRecordProcessor.java | 4 ++-- .../io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91207791d3..4ba8f3c146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Update `queueSize` metric description and attribute name for `processorType` + ([#5836](https://github.com/open-telemetry/opentelemetry-java/pull/5836)) + ## Version 1.30.1 (2023-09-11) * Fix autoconfigure bug creating multiple `PrometheusHttpServer` instances with same port diff --git a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/export/BatchLogRecordProcessor.java b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/export/BatchLogRecordProcessor.java index 26ac500557..1c8833fcaf 100644 --- a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/export/BatchLogRecordProcessor.java +++ b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/export/BatchLogRecordProcessor.java @@ -45,7 +45,7 @@ public final class BatchLogRecordProcessor implements LogRecordProcessor { private static final String WORKER_THREAD_NAME = BatchLogRecordProcessor.class.getSimpleName() + "_WorkerThread"; private static final AttributeKey LOG_RECORD_PROCESSOR_TYPE_LABEL = - AttributeKey.stringKey("logRecordProcessorType"); + AttributeKey.stringKey("processorType"); private static final AttributeKey LOG_RECORD_PROCESSOR_DROPPED_LABEL = AttributeKey.booleanKey("dropped"); private static final String LOG_RECORD_PROCESSOR_TYPE_VALUE = @@ -172,7 +172,7 @@ public final class BatchLogRecordProcessor implements LogRecordProcessor { meter .gaugeBuilder("queueSize") .ofLongs() - .setDescription("The number of logs queued") + .setDescription("The number of items queued") .setUnit("1") .buildWithCallback( result -> diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java index 8163522c16..126ef59c6c 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java @@ -48,7 +48,7 @@ public final class BatchSpanProcessor implements SpanProcessor { private static final String WORKER_THREAD_NAME = BatchSpanProcessor.class.getSimpleName() + "_WorkerThread"; private static final AttributeKey SPAN_PROCESSOR_TYPE_LABEL = - AttributeKey.stringKey("spanProcessorType"); + AttributeKey.stringKey("processorType"); private static final AttributeKey SPAN_PROCESSOR_DROPPED_LABEL = AttributeKey.booleanKey("dropped"); private static final String SPAN_PROCESSOR_TYPE_VALUE = BatchSpanProcessor.class.getSimpleName(); @@ -189,7 +189,7 @@ public final class BatchSpanProcessor implements SpanProcessor { meter .gaugeBuilder("queueSize") .ofLongs() - .setDescription("The number of spans queued") + .setDescription("The number of items queued") .setUnit("1") .buildWithCallback( result ->