Skip to content

Commit 0d16364

Browse files
More PR review changes (#5028)
* Some more PR review changes * Format code --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
1 parent c791f64 commit 0d16364

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.cursor/rules/metrics.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
alwaysApply: false
3-
description: Metrics
3+
description: Metrics API
44
---
5-
# Java SDK Metrics
5+
# Java SDK Metrics API
66

77
Metrics are enabled by default.
88

sentry/src/main/java/io/sentry/SentryMetricsEvent.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ public void setSpanId(final @Nullable SpanId spanId) {
107107
this.spanId = spanId;
108108
}
109109

110+
public @Nullable SentryId getTraceId() {
111+
return traceId;
112+
}
113+
114+
public void setTraceId(final @Nullable SentryId traceId) {
115+
this.traceId = traceId;
116+
}
117+
110118
public @NotNull Double getValue() {
111119
return value;
112120
}

sentry/src/main/java/io/sentry/logger/LoggerBatchProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public class LoggerBatchProcessor implements ILoggerBatchProcessor {
3636
private final @NotNull Queue<SentryLogEvent> queue;
3737
private final @NotNull ISentryExecutorService executorService;
3838
private volatile @Nullable Future<?> scheduledFlush;
39-
private static final @NotNull AutoClosableReentrantLock scheduleLock =
40-
new AutoClosableReentrantLock();
39+
private final @NotNull AutoClosableReentrantLock scheduleLock = new AutoClosableReentrantLock();
4140
private volatile boolean hasScheduled = false;
4241

4342
private final @NotNull ReusableCountLatch pendingCount = new ReusableCountLatch();

sentry/src/main/java/io/sentry/metrics/MetricsBatchProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public class MetricsBatchProcessor implements IMetricsBatchProcessor {
3535
private final @NotNull Queue<SentryMetricsEvent> queue;
3636
private final @NotNull ISentryExecutorService executorService;
3737
private volatile @Nullable Future<?> scheduledFlush;
38-
private static final @NotNull AutoClosableReentrantLock scheduleLock =
39-
new AutoClosableReentrantLock();
38+
private final @NotNull AutoClosableReentrantLock scheduleLock = new AutoClosableReentrantLock();
4039
private volatile boolean hasScheduled = false;
4140
private volatile boolean isShuttingDown = false;
4241

0 commit comments

Comments
 (0)