Skip to content

Commit 517f7d0

Browse files
authored
Merge 6938f6d into abb5743
2 parents abb5743 + 6938f6d commit 517f7d0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

sentry/src/main/java/io/sentry/SentryLogEventAttributeValue.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public SentryLogEventAttributeValue(final @NotNull String type, final @Nullable
2424

2525
public SentryLogEventAttributeValue(
2626
final @NotNull SentryAttributeType type, final @Nullable Object value) {
27-
this.type = type.apiName();
28-
this.value = value;
27+
this(type.apiName(), value);
2928
}
3029

3130
public @NotNull String getType() {

sentry/src/test/java/io/sentry/protocol/SentryLogsSerializationTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import io.sentry.ILogger
66
import io.sentry.JsonObjectReader
77
import io.sentry.JsonObjectWriter
88
import io.sentry.JsonSerializable
9+
import io.sentry.SentryAttributeType
910
import io.sentry.SentryLogEvent
1011
import io.sentry.SentryLogEventAttributeValue
1112
import io.sentry.SentryLogEvents
@@ -39,6 +40,7 @@ class SentryLogsSerializationTest {
3940
"sentry.trace.parent_span_id" to
4041
SentryLogEventAttributeValue("string", "f28b86350e534671"),
4142
"custom.boolean" to SentryLogEventAttributeValue("boolean", true),
43+
"custom.point2" to SentryLogEventAttributeValue(SentryAttributeType.STRING, Point(21, 31)),
4244
"custom.double" to SentryLogEventAttributeValue("double", 11.12.toDouble()),
4345
"custom.point" to SentryLogEventAttributeValue("string", Point(20, 30)),
4446
"custom.integer" to SentryLogEventAttributeValue("integer", 10),

sentry/src/test/resources/json/sentry_logs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
"type": "boolean",
3535
"value": true
3636
},
37+
"custom.point2": {
38+
"type": "string",
39+
"value": "Point{x:21,y:31}-Hello"
40+
},
3741
"custom.double": {
3842
"type": "double",
3943
"value": 11.12

0 commit comments

Comments
 (0)