Skip to content
Merged
Next Next commit
Support span type
  • Loading branch information
buenaflor committed Nov 25, 2025
commit 82276e8ceb3570aa1de7e9fca9554dc7677cd784
1 change: 1 addition & 0 deletions sentry/api/sentry.api
Original file line number Diff line number Diff line change
Expand Up @@ -3136,6 +3136,7 @@ public final class io/sentry/SentryItemType : java/lang/Enum, io/sentry/JsonSeri
public static final field ReplayRecording Lio/sentry/SentryItemType;
public static final field ReplayVideo Lio/sentry/SentryItemType;
public static final field Session Lio/sentry/SentryItemType;
public static final field Span Lio/sentry/SentryItemType;
public static final field Transaction Lio/sentry/SentryItemType;
public static final field Unknown Lio/sentry/SentryItemType;
public static final field UserFeedback Lio/sentry/SentryItemType;
Expand Down
1 change: 1 addition & 0 deletions sentry/src/main/java/io/sentry/SentryItemType.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public enum SentryItemType implements JsonSerializable {
CheckIn("check_in"),
Feedback("feedback"),
Log("log"),
Span("span"),
Unknown("__unknown__"); // DataCategory.Unknown

private final String itemType;
Comment on lines 23 to 29

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid concern but I am not sure if we need to handle this now since we cannot capture spans directly from the java sdk anyway

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, I think it's still valid even for the hybrid SDKs because client reports are counted from the unsent envelop items? But anyway, it can be done in a follow up PR later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check this

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SentryItemTypeSerializationTest {
assertEquals(serialize(SentryItemType.ReplayVideo), json("replay_video"))
assertEquals(serialize(SentryItemType.CheckIn), json("check_in"))
assertEquals(serialize(SentryItemType.Feedback), json("feedback"))
assertEquals(serialize(SentryItemType.Span), json("span"))
}

@Test
Expand All @@ -49,6 +50,7 @@ class SentryItemTypeSerializationTest {
assertEquals(deserialize(json("replay_video")), SentryItemType.ReplayVideo)
assertEquals(deserialize(json("check_in")), SentryItemType.CheckIn)
assertEquals(deserialize(json("feedback")), SentryItemType.Feedback)
assertEquals(deserialize(json("span")), SentryItemType.Span)
}

private fun json(type: String): String = "{\"type\":\"${type}\"}"
Expand Down
Loading