Skip to content

Commit

Permalink
+ Added jdk version and vendor to metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mjedig committed Oct 23, 2024
1 parent 1302e36 commit c1c1503
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -77,8 +79,13 @@ public void reportKafkaConnectStart(
final long startTime, final Map<String, String> 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);
Expand Down

0 comments on commit c1c1503

Please sign in to comment.