Package io.sentry

Class TraceContext

java.lang.Object
io.sentry.TraceContext
All Implemented Interfaces:
JsonSerializable, JsonUnknown

@Experimental public final class TraceContext extends Object implements JsonUnknown, JsonSerializable
  • Method Details

    • getTraceId

      @NotNull public @NotNull SentryId getTraceId()
    • getPublicKey

      @NotNull public @NotNull String getPublicKey()
    • getRelease

      @Nullable public @Nullable String getRelease()
    • getEnvironment

      @Nullable public @Nullable String getEnvironment()
    • getUserId

      @Nullable public @Nullable String getUserId()
    • getUserSegment

      @Deprecated @Nullable public @Nullable String getUserSegment()
      Deprecated.
      has no effect and will be removed in the next major update.
    • getTransaction

      @Nullable public @Nullable String getTransaction()
    • getSampleRate

      @Nullable public @Nullable String getSampleRate()
    • getSampled

      @Nullable public @Nullable String getSampled()
    • getReplayId

      @Nullable public @Nullable SentryId getReplayId()
    • 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
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
      Throws:
      IOException