Package io.sentry
Class SentryEnvelopeHeader
java.lang.Object
io.sentry.SentryEnvelopeHeader
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
@Internal
public final class SentryEnvelopeHeader
extends Object
implements JsonSerializable, JsonUnknown
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Constructor Summary
ConstructorDescriptionSentryEnvelopeHeader
(@Nullable SentryId eventId) SentryEnvelopeHeader
(@Nullable SentryId eventId, @Nullable SdkVersion sdkVersion) SentryEnvelopeHeader
(@Nullable SentryId eventId, @Nullable SdkVersion sdkVersion, @Nullable TraceContext traceContext) -
Method Summary
Modifier and TypeMethodDescription@Nullable SentryId
@Nullable SdkVersion
@Nullable Date
Get the timestamp when the event was sent from the SDK as string in RFC 3339 format.@Nullable TraceContext
void
serialize
(@NotNull ObjectWriter writer, @NotNull ILogger logger) void
Set he timestamp when the event was sent from the SDK as string in RFC 3339 format.void
setUnknown
(@Nullable Map<String, Object> unknown)
-
Constructor Details
-
SentryEnvelopeHeader
public SentryEnvelopeHeader(@Nullable @Nullable SentryId eventId, @Nullable @Nullable SdkVersion sdkVersion) -
SentryEnvelopeHeader
public SentryEnvelopeHeader(@Nullable @Nullable SentryId eventId, @Nullable @Nullable SdkVersion sdkVersion, @Nullable @Nullable TraceContext traceContext) -
SentryEnvelopeHeader
-
SentryEnvelopeHeader
public SentryEnvelopeHeader()
-
-
Method Details
-
getEventId
-
getSdkVersion
-
getTraceContext
-
getSentAt
Get the timestamp when the event was sent from the SDK as string in RFC 3339 format. Used for clock drift correction of the event timestamp. The time zone must be UTC. -
setSentAt
Set he timestamp when the event was sent from the SDK as string in RFC 3339 format. Used * for clock drift correction of the event timestamp. The time zone must be UTC.- Parameters:
sentAt
- The timestamp should be generated as close as possible to the transmission of the event, so that the delay between sending the envelope and receiving it on the server-side is minimized.
-
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serialize
in interfaceJsonSerializable
- Throws:
IOException
-
getUnknown
- Specified by:
getUnknown
in interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknown
in interfaceJsonUnknown
-