* Represents the severity of a log message, along with its text and priority.
*
* The severity can be one of TRACE, DEBUG, INFO, WARN, ERROR, or FATAL, and
* each severity level can have an associated identifier and priority level.
*
* See: severity-fields */ -public record Severity(String text, int id, Priority priority) { - - // ID values for the different severity levels. - private static final int TRACE_ID = 1; - private static final int DEBUG_ID = 5; - private static final int INFO_ID = 9; - private static final int WARN_ID = 13; - private static final int ERROR_ID = 17; - private static final int FATAL_ID = 21; - - // Predefined instances of Severity for each severity level. - public static final Severity TRACE = Severity.trace(Priority.LOW); - public static final Severity DEBUG = Severity.debug(Priority.LOW); - public static final Severity INFO = Severity.info(Priority.LOW); - public static final Severity WARN = Severity.warn(Priority.LOW); - public static final Severity ERROR = Severity.error(Priority.LOW); - public static final Severity FATAL = Severity.fatal(Priority.LOW); - - /** - * Creates a new log message with severity level TRACE and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity trace(String text) { - return Severity.trace(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level TRACE and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity trace(Priority priority) { - return Severity.trace(null, priority); - } - - /** - * Creates a new log message with severity level TRACE and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity trace(String text, Priority priority) { - return new Severity(text, TRACE_ID, priority); - } - - /** - * Creates a new log message with severity level DEBUG and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity debug(String text) { - return Severity.debug(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level DEBUG and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity debug(Priority priority) { - return Severity.debug(null, priority); - } - - /** - * Creates a new log message with severity level DEBUG and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity debug(String text, Priority priority) { - return new Severity(text, DEBUG_ID, priority); - } - - /** - * Creates a new log message with severity level INFO and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity info(String text) { - return Severity.info(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level INFO and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity info(Priority priority) { - return Severity.info(null, priority); - } - - /** - * Creates a new log message with severity level INFO and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity info(String text, Priority priority) { - return new Severity(text, INFO_ID, priority); - } - - /** - * Creates a new log message with severity level WARN and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity warn(String text) { - return Severity.warn(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level WARN and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity warn(Priority priority) { - return Severity.warn(null, priority); - } - - /** - * Creates a new log message with severity level WARN and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity warn(String text, Priority priority) { - return new Severity(text, WARN_ID, priority); - } - - /** - * Creates a new log message with severity level ERROR and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity error(String text) { - return Severity.error(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level ERROR and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity error(Priority priority) { - return Severity.error(null, priority); - } - - /** - * Creates a new log message with severity level ERROR and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity error(String text, Priority priority) { - return new Severity(text, ERROR_ID, priority); - } - - /** - * Creates a new log message with severity level FATAL and the given text and a - * default low priority level. - * - * @param text the text of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity fatal(String text) { - return Severity.fatal(text, Priority.LOW); - } - - /** - * Creates a new log message with severity level FATAL and the given priority. - * - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity fatal(Priority priority) { - return Severity.fatal(null, priority); - } - - /** - * Creates a new log message with severity level FATAL and the given text and - * priority. - * - * @param text the text of the log message, or null if not provided - * @param priority the priority level of the log message - * @return a new instance of the Severity class with the given parameters - */ - public static Severity fatal(String text, Priority priority) { - return new Severity(text, FATAL_ID, priority); - } - - /** - * Return the severity level combined with the priority - * - * @return severity level with priority - */ - public int id() { - return this.id + priority.difference; - } - - /** - * Return a readable severity level name without the priority level - * - * @return severity level name - */ - public String name() { - return switch (this.id) { - case TRACE_ID -> "TRACE"; - case DEBUG_ID -> "DEBUG"; - case INFO_ID -> "INFO"; - case WARN_ID -> "WARN"; - case ERROR_ID -> "ERROR"; - case FATAL_ID -> "FATAL"; - default -> throw new IllegalArgumentException("Unexpected value: " + this.id); - }; - } - - /** - * Return a readable severity level name with the priority level - * - * See: displaying-severity - * - * @return severity level name - */ - public String shortName() { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(switch (this.id) { - case TRACE_ID -> "TRACE"; - case DEBUG_ID -> "DEBUG"; - case INFO_ID -> "INFO"; - case WARN_ID -> "WARN"; - case ERROR_ID -> "ERROR"; - case FATAL_ID -> "FATAL"; - default -> throw new IllegalArgumentException("Unexpected value: " + this.id); - }); - - if (this.priority != Priority.LOW) { - stringBuilder.append(this.priority.difference); - } - - return stringBuilder.toString(); - } - - /** - * Transform the currently severity into the opentelemetry {@code io.opentelemetry.api.logs.Severity} class - * - * @return severity transformed into {@code io.opentelemetry.api.logs.Severity} - */ - public io.opentelemetry.api.logs.Severity toOpenTelemetry() { - return io.opentelemetry.api.logs.Severity.values()[this.id]; - } - - /** - * Represents the priority of a log message. The priority can be one of LOW, - * NORMAL, MEDIUM, or HIGH, and each priority level have an associated numeric - * difference value that is added to the severity ID when calculating the - * overall priority of a log message. - */ - public static enum Priority { - /** - * LOW priority is the default one and represent a value from zero - */ - LOW(0), - - /** - * NORMAL priority represent a value from one - */ - NORMAL(1), - - /** - * MEDIUM priority represent a value from two - */ - MEDIUM(2), - - /** - * HIGH priority represent a value from three - */ - HIGH(3); - - final int difference; - - /** - * Constructs a new instance of Priority with the specified numeric difference - * value. - * - * @param difference the numeric difference value for this priority level - */ - private Priority(int difference) { - this.difference = difference; +public final class Severity { + + // ID values for the different severity levels. + private static final int TRACE_ID = 1; + private static final int DEBUG_ID = 5; + private static final int INFO_ID = 9; + private static final int WARN_ID = 13; + private static final int ERROR_ID = 17; + private static final int FATAL_ID = 21; + + // Predefined instances of Severity for each severity level. + public static final Severity TRACE = Severity.trace(Priority.LOW); + public static final Severity DEBUG = Severity.debug(Priority.LOW); + public static final Severity INFO = Severity.info(Priority.LOW); + public static final Severity WARN = Severity.warn(Priority.LOW); + public static final Severity ERROR = Severity.error(Priority.LOW); + public static final Severity FATAL = Severity.fatal(Priority.LOW); + private final String text; + private final int id; + private final Priority priority; + + /** + * + */ + public Severity(String text, int id, Priority priority) { + this.text = text; + this.id = id; + this.priority = priority; + } + + /** + * Creates a new log message with severity level TRACE and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity trace(String text) { + return Severity.trace(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level TRACE and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity trace(Priority priority) { + return Severity.trace(null, priority); + } + + /** + * Creates a new log message with severity level TRACE and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity trace(String text, Priority priority) { + return new Severity(text, TRACE_ID, priority); + } + + /** + * Creates a new log message with severity level DEBUG and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity debug(String text) { + return Severity.debug(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level DEBUG and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity debug(Priority priority) { + return Severity.debug(null, priority); + } + + /** + * Creates a new log message with severity level DEBUG and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity debug(String text, Priority priority) { + return new Severity(text, DEBUG_ID, priority); + } + + /** + * Creates a new log message with severity level INFO and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity info(String text) { + return Severity.info(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level INFO and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity info(Priority priority) { + return Severity.info(null, priority); + } + + /** + * Creates a new log message with severity level INFO and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity info(String text, Priority priority) { + return new Severity(text, INFO_ID, priority); + } + + /** + * Creates a new log message with severity level WARN and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity warn(String text) { + return Severity.warn(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level WARN and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity warn(Priority priority) { + return Severity.warn(null, priority); + } + + /** + * Creates a new log message with severity level WARN and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity warn(String text, Priority priority) { + return new Severity(text, WARN_ID, priority); + } + + /** + * Creates a new log message with severity level ERROR and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity error(String text) { + return Severity.error(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level ERROR and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity error(Priority priority) { + return Severity.error(null, priority); + } + + /** + * Creates a new log message with severity level ERROR and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity error(String text, Priority priority) { + return new Severity(text, ERROR_ID, priority); + } + + /** + * Creates a new log message with severity level FATAL and the given text and a + * default low priority level. + * + * @param text the text of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity fatal(String text) { + return Severity.fatal(text, Priority.LOW); + } + + /** + * Creates a new log message with severity level FATAL and the given priority. + * + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity fatal(Priority priority) { + return Severity.fatal(null, priority); + } + + /** + * Creates a new log message with severity level FATAL and the given text and + * priority. + * + * @param text the text of the log message, or null if not provided + * @param priority the priority level of the log message + * @return a new instance of the Severity class with the given parameters + */ + public static Severity fatal(String text, Priority priority) { + return new Severity(text, FATAL_ID, priority); + } + + /** + * Return the severity level combined with the priority + * + * @return severity level with priority + */ + public int id() { + return this.id + priority.difference; + } + + /** + * Return a readable severity level name without the priority level + * + * @return severity level name + */ + public String name() { + if (this.id == TRACE_ID) { + return "TRACE"; + } else if (this.id == DEBUG_ID) { + return "DEBUG"; + } else if (this.id == INFO_ID) { + return "INFO"; + } else if (this.id == WARN_ID) { + return "WARN"; + } else if (this.id == ERROR_ID) { + return "ERROR"; + } else if (this.id == FATAL_ID) { + return "FATAL"; + } else { + throw new IllegalArgumentException("Unexpected value: " + this.id); } - } + } + + /** + * Return a readable severity level name with the priority level + *
+ * See: displaying-severity
+ *
+ * @return severity level name
+ */
+ public String shortName() {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(this.name());
+
+ if (this.priority != Priority.LOW) {
+ stringBuilder.append(this.priority.difference);
+ }
+
+ return stringBuilder.toString();
+ }
+
+ /**
+ * Transform the currently severity into the opentelemetry {@code io.opentelemetry.api.logs.Severity} class
+ *
+ * @return severity transformed into {@code io.opentelemetry.api.logs.Severity}
+ */
+ public io.opentelemetry.api.logs.Severity toOpenTelemetry() {
+ return io.opentelemetry.api.logs.Severity.values()[this.id];
+ }
+
+ public String text() {
+ return text;
+ }
+
+ public Priority priority() {
+ return priority;
+ }
+
+ @java.lang.Override
+ public boolean equals(java.lang.Object obj) {
+ if (obj == this) return true;
+ if (obj == null || obj.getClass() != this.getClass()) return false;
+ var that = (Severity) obj;
+ return java.util.Objects.equals(this.text, that.text) &&
+ this.id == that.id &&
+ java.util.Objects.equals(this.priority, that.priority);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return java.util.Objects.hash(text, id, priority);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "Severity[" +
+ "text=" + text + ", " +
+ "id=" + id + ", " +
+ "priority=" + priority + ']';
+ }
+
+
+ /**
+ * Represents the priority of a log message. The priority can be one of LOW,
+ * NORMAL, MEDIUM, or HIGH, and each priority level have an associated numeric
+ * difference value that is added to the severity ID when calculating the
+ * overall priority of a log message.
+ */
+ public static enum Priority {
+ /**
+ * LOW priority is the default one and represent a value from zero
+ */
+ LOW(0),
+
+ /**
+ * NORMAL priority represent a value from one
+ */
+ NORMAL(1),
+
+ /**
+ * MEDIUM priority represent a value from two
+ */
+ MEDIUM(2),
+
+ /**
+ * HIGH priority represent a value from three
+ */
+ HIGH(3);
+
+ final int difference;
+
+ /**
+ * Constructs a new instance of Priority with the specified numeric difference
+ * value.
+ *
+ * @param difference the numeric difference value for this priority level
+ */
+ private Priority(int difference) {
+ this.difference = difference;
+ }
+ }
}
\ No newline at end of file
diff --git a/sdk/highlight-java/highlight-common/src/main/java/io/highlight/sdk/common/record/HighlightRecord.java b/sdk/highlight-java/highlight-common/src/main/java/io/highlight/sdk/common/record/HighlightRecord.java
index a3aace5a162..aff744b3118 100644
--- a/sdk/highlight-java/highlight-common/src/main/java/io/highlight/sdk/common/record/HighlightRecord.java
+++ b/sdk/highlight-java/highlight-common/src/main/java/io/highlight/sdk/common/record/HighlightRecord.java
@@ -26,7 +26,7 @@
* @see HighlightErrorRecord
* @see Severity
*/
-public sealed class HighlightRecord permits HighlightErrorRecord, HighlightLogRecord {
+public class HighlightRecord {
/**
* Returns a builder for creating a new error record.
diff --git a/sdk/highlight-java/highlight-log/highlight-log-java/src/main/java/io/highlight/log/java/HighlightLoggerHandler.java b/sdk/highlight-java/highlight-log/highlight-log-java/src/main/java/io/highlight/log/java/HighlightLoggerHandler.java
index 8bdb0add864..03160c0e0a6 100644
--- a/sdk/highlight-java/highlight-log/highlight-log-java/src/main/java/io/highlight/log/java/HighlightLoggerHandler.java
+++ b/sdk/highlight-java/highlight-log/highlight-log-java/src/main/java/io/highlight/log/java/HighlightLoggerHandler.java
@@ -51,7 +51,7 @@ public void publish(LogRecord logRecord) {
.put(HighlightAttributes.HIGHLIGHT_JAVA_SEQUENCE_NUMBER, logRecord.getSequenceNumber())
.put(HighlightAttributes.HIGHLIGHT_JAVA_SOURCE_CLASS_NAME, logRecord.getSourceClassName())
.put(HighlightAttributes.HIGHLIGHT_JAVA_SOURCE_METHOD_NAME, logRecord.getSourceMethodName())
- .put(HighlightAttributes.HIGHLIGHT_JAVA_THREAD_ID, logRecord.getLongThreadID()));
+ .put(HighlightAttributes.HIGHLIGHT_JAVA_THREAD_ID, logRecord.getThreadID()));
this.highlight.capture(highlightRecord.build());
}
diff --git a/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/Highlight.java b/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/Highlight.java
index 3c503a6f37e..d624bfb2d27 100644
--- a/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/Highlight.java
+++ b/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/Highlight.java
@@ -245,9 +245,11 @@ public void capture(HighlightRecord record) {
throw new HighlightIllegalStateException("Highlight state is not running");
}
- if (record instanceof HighlightLogRecord logRecord) {
+ if (record instanceof HighlightLogRecord) {
+ HighlightLogRecord logRecord = (HighlightLogRecord) record;
this.logger.process(logRecord);
- } else if (record instanceof HighlightErrorRecord errorRecord) {
+ } else if (record instanceof HighlightErrorRecord) {
+ HighlightErrorRecord errorRecord = (HighlightErrorRecord) record;
this.tracer.process(errorRecord);
} else {
throw new HighlightInvalidRecordException("Invalid record type", record);
diff --git a/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/HighlightSession.java b/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/HighlightSession.java
index 9fd5a205277..2d61cc698a7 100644
--- a/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/HighlightSession.java
+++ b/sdk/highlight-java/highlight-sdk/src/main/java/io/highlight/sdk/HighlightSession.java
@@ -13,68 +13,103 @@
* It implements the HighlightSessionId interface which provides a unique
* identifier for the session.
*/
-public record HighlightSession(String sessionId) implements HighlightSessionId {
+public final class HighlightSession implements HighlightSessionId {
+ private final String sessionId;
- /**
- * Captures a record and add the current session ID.
- *
- * @param record The builder used to build the log record.
- */
- public void captureRecord(HighlightRecord.Builder> record) {
- record.userSession(this);
+ /**
+ *
+ */
+ public HighlightSession(String sessionId) {
+ this.sessionId = sessionId;
+ }
- Highlight.captureRecord(record.build());
- }
+ /**
+ * Captures a record and add the current session ID.
+ *
+ * @param record The builder used to build the log record.
+ */
+ public void captureRecord(HighlightRecord.Builder> record) {
+ record.userSession(this);
- /**
- * Captures the provided record.
- * If the record is a HighlightLogRecord, a log record will be captured.
- * If the record is a HighlightErrorRecord, an error record will be captured.
- *
- * Otherwise, a HighlightInvalidRecordException will be thrown.
- *
- * @throws HighlightInvalidRecordException when the given class is invalid
- * @param record The record to be captured.
- */
- public void captureRecord(HighlightRecord record) {
- if (record instanceof HighlightLogRecord logRecord) {
- this.captureRecord(HighlightRecord.log(logRecord));
- } else if (record instanceof HighlightErrorRecord errorRecord) {
- this.captureRecord(HighlightRecord.error(errorRecord));
- } else {
- throw new HighlightInvalidRecordException("Invalid record type", record);
- }
- }
+ Highlight.captureRecord(record.build());
+ }
- /**
- * Captures an error record for the provided throwable.
- *
- * @param error The throwable for which to capture an error record.
- */
- public void captureException(Throwable error) {
- this.captureRecord(HighlightRecord.error()
- .throwable(error));
- }
+ /**
+ * Captures the provided record.
+ * If the record is a HighlightLogRecord, a log record will be captured.
+ * If the record is a HighlightErrorRecord, an error record will be captured.
+ *
+ * Otherwise, a HighlightInvalidRecordException will be thrown.
+ *
+ * @param record The record to be captured.
+ * @throws HighlightInvalidRecordException when the given class is invalid
+ */
+ public void captureRecord(HighlightRecord record) {
+ if (record instanceof HighlightLogRecord) {
+ HighlightLogRecord logRecord = (HighlightLogRecord) record;
+ this.captureRecord(HighlightRecord.log(logRecord));
+ } else if (record instanceof HighlightErrorRecord) {
+ HighlightErrorRecord errorRecord = (HighlightErrorRecord) record;
+ this.captureRecord(HighlightRecord.error(errorRecord));
+ } else {
+ throw new HighlightInvalidRecordException("Invalid record type", record);
+ }
+ }
- /**
- * Captures a log record with the provided severity.
- *
- * @param severity The severity of the log record to be captured.
- */
- public void captureLog(Severity severity) {
- this.captureRecord(HighlightRecord.log()
- .severity(severity));
- }
+ /**
+ * Captures an error record for the provided throwable.
+ *
+ * @param error The throwable for which to capture an error record.
+ */
+ public void captureException(Throwable error) {
+ this.captureRecord(HighlightRecord.error()
+ .throwable(error));
+ }
+
+ /**
+ * Captures a log record with the provided severity.
+ *
+ * @param severity The severity of the log record to be captured.
+ */
+ public void captureLog(Severity severity) {
+ this.captureRecord(HighlightRecord.log()
+ .severity(severity));
+ }
+
+ /**
+ * Captures a log record with the provided severity and message.
+ *
+ * @param severity The severity of the log record to be captured.
+ * @param message The message to be included in the log record.
+ */
+ public void captureLog(Severity severity, String message) {
+ this.captureRecord(HighlightRecord.log()
+ .severity(severity)
+ .message(message));
+ }
+
+ @java.lang.Override
+ public String sessionId() {
+ return sessionId;
+ }
+
+ @java.lang.Override
+ public boolean equals(java.lang.Object obj) {
+ if (obj == this) return true;
+ if (obj == null || obj.getClass() != this.getClass()) return false;
+ var that = (HighlightSession) obj;
+ return java.util.Objects.equals(this.sessionId, that.sessionId);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return java.util.Objects.hash(sessionId);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "HighlightSession[" +
+ "sessionId=" + sessionId + ']';
+ }
- /**
- * Captures a log record with the provided severity and message.
- *
- * @param severity The severity of the log record to be captured.
- * @param message The message to be included in the log record.
- */
- public void captureLog(Severity severity, String message) {
- this.captureRecord(HighlightRecord.log()
- .severity(severity)
- .message(message));
- }
}
\ No newline at end of file
diff --git a/sdk/highlight-java/pom.xml b/sdk/highlight-java/pom.xml
index 86378d7aeb7..6b007faaa26 100644
--- a/sdk/highlight-java/pom.xml
+++ b/sdk/highlight-java/pom.xml
@@ -46,8 +46,8 @@