From c1c150328cdd9117cf4cb9e025136e0bf52fd4f0 Mon Sep 17 00:00:00 2001 From: Marcel Jedig Date: Wed, 23 Oct 2024 16:36:19 +0200 Subject: [PATCH] + Added jdk version and vendor to metrics --- .../internal/telemetry/SnowflakeTelemetryService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java b/src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java index 11d1054ef..3105e4a6e 100644 --- a/src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java +++ b/src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java @@ -40,6 +40,8 @@ public abstract class SnowflakeTelemetryService { private static final String KAFKA_VERSION = "kafka_version"; protected static final String IS_PIPE_CLOSING = "is_pipe_closing"; protected static final String IS_CHANNEL_CLOSING = "is_channel_closing"; + public static final String JDK_VERSION = "jdk-version"; + public static final String JDK_DISTRIBUTION = "jdk-distribution"; // Telemetry instance fetched from JDBC protected Telemetry telemetry; @@ -77,8 +79,13 @@ public void reportKafkaConnectStart( final long startTime, final Map userProvidedConfig) { ObjectNode dataObjectNode = getObjectNode(); + String jdkVersion = System.getProperty("java.version"); + String jdkDistribution = System.getProperty("java.vendor"); + dataObjectNode.put(START_TIME, startTime); dataObjectNode.put(KAFKA_VERSION, AppInfoParser.getVersion()); + dataObjectNode.put(JDK_VERSION, jdkVersion); + dataObjectNode.put(JDK_DISTRIBUTION, jdkDistribution); addUserConnectorPropertiesToDataNode(userProvidedConfig, dataObjectNode); send(SnowflakeTelemetryService.TelemetryType.KAFKA_START, dataObjectNode);