com.launchdarkly.sdk.server.DiagnosticId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of launchdarkly-java-server-sdk Show documentation
Show all versions of launchdarkly-java-server-sdk Show documentation
Official LaunchDarkly SDK for Java
package com.launchdarkly.sdk.server;
import java.util.UUID;
class DiagnosticId {
final String diagnosticId = UUID.randomUUID().toString();
final String sdkKeySuffix;
DiagnosticId(String sdkKey) {
if (sdkKey == null) {
sdkKeySuffix = null;
} else {
this.sdkKeySuffix = sdkKey.substring(Math.max(0, sdkKey.length() - 6));
}
}
}