From 63096098b48883e4af128280af0c5d3e1b36c8ac Mon Sep 17 00:00:00 2001 From: Vahid Hashemian Date: Sat, 22 Aug 2020 00:59:42 +0000 Subject: [PATCH] Update tag value for message key/value size metric --- pom.xml | 2 +- singer-commons/pom.xml | 2 +- singer/pom.xml | 2 +- .../pinterest/singer/processor/DefaultLogStreamProcessor.java | 4 ++-- .../singer/processor/MemoryEfficientLogStreamProcessor.java | 4 ++-- thrift-logger/pom.xml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 4d3f31f0..28abf584 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.pinterest.singer singer-package - 0.8.0.27 + 0.8.0.28 pom Singer Logging Agent modules 2013 diff --git a/singer-commons/pom.xml b/singer-commons/pom.xml index 6fb36da1..23040190 100644 --- a/singer-commons/pom.xml +++ b/singer-commons/pom.xml @@ -20,7 +20,7 @@ com.pinterest.singer singer-package - 0.8.0.27 + 0.8.0.28 ../pom.xml diff --git a/singer/pom.xml b/singer/pom.xml index 23970af3..7419da1a 100644 --- a/singer/pom.xml +++ b/singer/pom.xml @@ -7,7 +7,7 @@ com.pinterest.singer singer-package - 0.8.0.27 + 0.8.0.28 ../pom.xml diff --git a/singer/src/main/java/com/pinterest/singer/processor/DefaultLogStreamProcessor.java b/singer/src/main/java/com/pinterest/singer/processor/DefaultLogStreamProcessor.java index 1c803249..26fdedec 100644 --- a/singer/src/main/java/com/pinterest/singer/processor/DefaultLogStreamProcessor.java +++ b/singer/src/main/java/com/pinterest/singer/processor/DefaultLogStreamProcessor.java @@ -555,12 +555,12 @@ private void writeLogMessages(List logMessagesRead) OpenTsdbMetricConverter.gauge( SingerMetrics.PROCESSOR_MESSAGE_KEY_SIZE_BYTES, logMessage.isSetKey() ? logMessage.getKey().length : 0, - "log=" + logStream.getLogStreamName(), + "log=" + logStream.getSingerLog().getSingerLogConfig().getName(), "host=" + SingerUtils.getHostname()); OpenTsdbMetricConverter.gauge( SingerMetrics.PROCESSOR_MESSAGE_VALUE_SIZE_BYTES, logMessage.isSetMessage() ? logMessage.getMessage().length : 0, - "log=" + logStream.getLogStreamName(), + "log=" + logStream.getSingerLog().getSingerLogConfig().getName(), "host=" + SingerUtils.getHostname()); } writer.writeLogMessages(logMessagesToWrite); diff --git a/singer/src/main/java/com/pinterest/singer/processor/MemoryEfficientLogStreamProcessor.java b/singer/src/main/java/com/pinterest/singer/processor/MemoryEfficientLogStreamProcessor.java index 47ef2350..bc3523a4 100644 --- a/singer/src/main/java/com/pinterest/singer/processor/MemoryEfficientLogStreamProcessor.java +++ b/singer/src/main/java/com/pinterest/singer/processor/MemoryEfficientLogStreamProcessor.java @@ -103,12 +103,12 @@ protected int processLogMessageBatch() throws IOException, LogStreamWriterExcept OpenTsdbMetricConverter.gauge( SingerMetrics.PROCESSOR_MESSAGE_KEY_SIZE_BYTES, logMessage.isSetKey() ? logMessage.getKey().length : 0, - "log=" + logStream.getLogStreamName(), + "log=" + logStream.getSingerLog().getSingerLogConfig().getName(), "host=" + SingerUtils.getHostname()); OpenTsdbMetricConverter.gauge( SingerMetrics.PROCESSOR_MESSAGE_VALUE_SIZE_BYTES, logMessage.isSetMessage() ? logMessage.getMessage().length : 0, - "log=" + logStream.getLogStreamName(), + "log=" + logStream.getSingerLog().getSingerLogConfig().getName(), "host=" + SingerUtils.getHostname()); writer.writeLogMessageToCommit(logMessage); } diff --git a/thrift-logger/pom.xml b/thrift-logger/pom.xml index 41d24f7b..bc390822 100644 --- a/thrift-logger/pom.xml +++ b/thrift-logger/pom.xml @@ -4,7 +4,7 @@ com.pinterest.singer singer-package - 0.8.0.27 + 0.8.0.28 ../pom.xml thrift-logger