Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Improvements

- Mark `SentryEnvelope` as not internal ([#4748](https://github.com/getsentry/sentry-java/pull/4748))

## 8.22.0

### Features
Expand Down
9 changes: 8 additions & 1 deletion sentry/src/main/java/io/sentry/SentryEnvelope.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,32 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@ApiStatus.Internal
public final class SentryEnvelope {

// types: session_batch, session, event, attachment
// an envelope cannot have 2 events, but eg multiple sessions
private final @NotNull SentryEnvelopeHeader header;
private final @NotNull Iterable<SentryEnvelopeItem> items;

@ApiStatus.Internal
public @NotNull Iterable<SentryEnvelopeItem> getItems() {
return items;
}

@ApiStatus.Internal
public @NotNull SentryEnvelopeHeader getHeader() {
return header;
}

@ApiStatus.Internal
public SentryEnvelope(
final @NotNull SentryEnvelopeHeader header,
final @NotNull Iterable<SentryEnvelopeItem> items) {
this.header = Objects.requireNonNull(header, "SentryEnvelopeHeader is required.");
this.items = Objects.requireNonNull(items, "SentryEnvelope items are required.");
}

@ApiStatus.Internal
public SentryEnvelope(
final @Nullable SentryId eventId,
final @Nullable SdkVersion sdkVersion,
Expand All @@ -42,6 +45,7 @@ public SentryEnvelope(
this.items = Objects.requireNonNull(items, "SentryEnvelope items are required.");
}

@ApiStatus.Internal
public SentryEnvelope(
final @Nullable SentryId eventId,
final @Nullable SdkVersion sdkVersion,
Expand All @@ -54,6 +58,7 @@ public SentryEnvelope(
this.items = items;
}

@ApiStatus.Internal
public static @NotNull SentryEnvelope from(
final @NotNull ISerializer serializer,
final @NotNull Session session,
Expand All @@ -66,6 +71,7 @@ public SentryEnvelope(
null, sdkVersion, SentryEnvelopeItem.fromSession(serializer, session));
}

@ApiStatus.Internal
public static @NotNull SentryEnvelope from(
final @NotNull ISerializer serializer,
final @NotNull SentryBaseEvent event,
Expand All @@ -78,6 +84,7 @@ public SentryEnvelope(
event.getEventId(), sdkVersion, SentryEnvelopeItem.fromEvent(serializer, event));
}

@ApiStatus.Internal
public static @NotNull SentryEnvelope from(
final @NotNull ISerializer serializer,
final @NotNull ProfilingTraceData profilingTraceData,
Expand Down
Loading