Skip to content

Commit d7a5d68

Browse files
getsentry-botadinauer
authored andcommitted
Format code
1 parent e449fa0 commit d7a5d68

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

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

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,41 @@
22

33
import static io.sentry.DateUtils.doubleToBigDecimal;
44

5-
import org.jetbrains.annotations.NotNull;
6-
import org.jetbrains.annotations.Nullable;
7-
5+
import io.sentry.protocol.SentryId;
6+
import io.sentry.vendor.gson.stream.JsonToken;
87
import java.io.IOException;
98
import java.util.HashMap;
109
import java.util.Map;
11-
12-
import io.sentry.protocol.SentryId;
13-
import io.sentry.vendor.gson.stream.JsonToken;
10+
import org.jetbrains.annotations.NotNull;
11+
import org.jetbrains.annotations.Nullable;
1412

1513
public final class SentryMetricsEvent implements JsonUnknown, JsonSerializable {
1614

1715
private @NotNull SentryId traceId;
1816
private @Nullable SpanId spanId;
19-
/**
20-
* Timestamp in seconds (epoch time) indicating when the metric was recorded.
21-
*/
17+
18+
/** Timestamp in seconds (epoch time) indicating when the metric was recorded. */
2219
private @NotNull Double timestamp;
20+
2321
/**
24-
* The name of the metric.
25-
* This should follow a hierarchical naming convention using dots as separators
26-
* (e.g., api.response_time, db.query.duration).
22+
* The name of the metric. This should follow a hierarchical naming convention using dots as
23+
* separators (e.g., api.response_time, db.query.duration).
2724
*/
2825
private @NotNull String name;
29-
/**
30-
* The unit of measurement for the metric value.
31-
*/
26+
27+
/** The unit of measurement for the metric value. */
3228
private @Nullable String unit;
29+
3330
/**
34-
* The type of metric. One of:
35-
* - counter: A metric that increments counts
36-
* - gauge: A metric that tracks a value that can go up or down
37-
* - distribution: A metric that tracks the statistical distribution of values
31+
* The type of metric. One of: - counter: A metric that increments counts - gauge: A metric that
32+
* tracks a value that can go up or down - distribution: A metric that tracks the statistical
33+
* distribution of values
3834
*/
3935
private @NotNull String type;
36+
4037
/**
41-
* The numeric value of the metric. The interpretation depends on the metric type:
42-
* - For counter metrics: the count to increment by (should default to 1)
43-
* - For gauge metrics: the current value
38+
* The numeric value of the metric. The interpretation depends on the metric type: - For counter
39+
* metrics: the count to increment by (should default to 1) - For gauge metrics: the current value
4440
* - For distribution metrics: a single measured value
4541
*/
4642
private @NotNull Double value;
@@ -279,7 +275,8 @@ public static final class Deserializer implements JsonDeserializer<SentryMetrics
279275
throw exception;
280276
}
281277

282-
final SentryMetricsEvent logEvent = new SentryMetricsEvent(traceId, timestamp, name, type, value);
278+
final SentryMetricsEvent logEvent =
279+
new SentryMetricsEvent(traceId, timestamp, name, type, value);
283280

284281
logEvent.setAttributes(attributes);
285282
logEvent.setSpanId(spanId);

sentry/src/main/java/io/sentry/SentryMetricsEvents.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package io.sentry;
22

3-
import org.jetbrains.annotations.NotNull;
4-
import org.jetbrains.annotations.Nullable;
5-
3+
import io.sentry.vendor.gson.stream.JsonToken;
64
import java.io.IOException;
75
import java.util.HashMap;
86
import java.util.List;
97
import java.util.Map;
10-
11-
import io.sentry.vendor.gson.stream.JsonToken;
8+
import org.jetbrains.annotations.NotNull;
9+
import org.jetbrains.annotations.Nullable;
1210

1311
public final class SentryMetricsEvents implements JsonUnknown, JsonSerializable {
1412

0 commit comments

Comments
 (0)