Package io.sentry

Class TransactionOptions

java.lang.Object
io.sentry.SpanOptions
io.sentry.TransactionOptions

public final class TransactionOptions extends SpanOptions
Sentry Transaction options
  • Field Details

    • DEFAULT_DEADLINE_TIMEOUT_AUTO_TRANSACTION

      @Internal public static final long DEFAULT_DEADLINE_TIMEOUT_AUTO_TRANSACTION
      See Also:
  • Constructor Details

    • TransactionOptions

      public TransactionOptions()
  • Method Details

    • getCustomSamplingContext

      @Nullable public @Nullable CustomSamplingContext getCustomSamplingContext()
      Gets the customSamplingContext
      Returns:
      customSamplingContext - the customSamplingContext
    • setCustomSamplingContext

      public void setCustomSamplingContext(@Nullable @Nullable CustomSamplingContext customSamplingContext)
      Sets the customSamplingContext
      Parameters:
      customSamplingContext - - the customSamplingContext
    • isBindToScope

      public boolean isBindToScope()
      Checks if bindToScope is enabled
      Returns:
      true if enabled or false otherwise
    • setBindToScope

      public void setBindToScope(boolean bindToScope)
      Sets bindToScope to enabled or disabled
      Parameters:
      bindToScope - true if enabled or false otherwise
    • getStartTimestamp

      @Nullable public @Nullable SentryDate getStartTimestamp()
      Gets the startTimestamp
      Returns:
      startTimestamp - the startTimestamp
    • setStartTimestamp

      public void setStartTimestamp(@Nullable @Nullable SentryDate startTimestamp)
      Sets the startTimestamp
      Parameters:
      startTimestamp - - the startTimestamp
    • isWaitForChildren

      public boolean isWaitForChildren()
      Checks if waitForChildren is enabled
      Returns:
      true if enabled or false otherwise
    • setWaitForChildren

      public void setWaitForChildren(boolean waitForChildren)
      Sets waitForChildren to enabled or disabled
      Parameters:
      waitForChildren - true if enabled or false otherwise
    • getIdleTimeout

      @Nullable public @Nullable Long getIdleTimeout()
      Gets the idleTimeout
      Returns:
      idleTimeout - the idleTimeout
    • setDeadlineTimeout

      @Internal public void setDeadlineTimeout(@Nullable @Nullable Long deadlineTimeoutMs)
      Sets the deadlineTimeout. If set, an transaction and it's child spans will be force-finished with status SpanStatus.DEADLINE_EXCEEDED in case the transaction isn't finished in time.
      Parameters:
      deadlineTimeoutMs - - the deadlineTimeout, in ms - or null if no deadline should be set
    • getDeadlineTimeout

      @Internal @Nullable public @Nullable Long getDeadlineTimeout()
      Gets the deadlineTimeout
      Returns:
      deadlineTimeout - the deadlineTimeout, in ms - or null if no deadline is set
    • setIdleTimeout

      public void setIdleTimeout(@Nullable @Nullable Long idleTimeout)
      Sets the idleTimeout
      Parameters:
      idleTimeout - - the idleTimeout
    • getTransactionFinishedCallback

      @Nullable public @Nullable TransactionFinishedCallback getTransactionFinishedCallback()
      Gets the transactionFinishedCallback callback
      Returns:
      transactionFinishedCallback - the transactionFinishedCallback callback
    • setTransactionFinishedCallback

      public void setTransactionFinishedCallback(@Nullable @Nullable TransactionFinishedCallback transactionFinishedCallback)
      Sets the transactionFinishedCallback callback
      Parameters:
      transactionFinishedCallback - - the transactionFinishedCallback callback
    • setAppStartTransaction

      @Internal public void setAppStartTransaction(boolean appStartTransaction)
    • isAppStartTransaction

      @Internal public boolean isAppStartTransaction()