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
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Constructor Summary
ConstructorsConstructorDescriptionSentryEnvelopeHeader(@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 DateGet the timestamp when the event was sent from the SDK as string in RFC 3339 format.@Nullable TraceContextvoidserialize(@NotNull ObjectWriter writer, @NotNull ILogger logger) voidSet he timestamp when the event was sent from the SDK as string in RFC 3339 format.voidsetUnknown(@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:
serializein interfaceJsonSerializable- Throws:
IOException
-
getUnknown
- Specified by:
getUnknownin interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknownin interfaceJsonUnknown
-