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
  • 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

      public SentryEnvelopeHeader(@Nullable @Nullable SentryId eventId)
    • SentryEnvelopeHeader

      public SentryEnvelopeHeader()
  • Method Details

    • getEventId

      @Nullable public @Nullable SentryId getEventId()
    • getSdkVersion

      @Nullable public @Nullable SdkVersion getSdkVersion()
    • getTraceContext

      @Nullable public @Nullable TraceContext getTraceContext()
    • getSentAt

      @Nullable public @Nullable Date 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

      public void setSentAt(@Nullable @Nullable Date sentAt)
      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 interface JsonSerializable
      Throws:
      IOException
    • getUnknown

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown