Package io.sentry

Class NoOpTransaction

    • Method Detail

      • setName

        public void setName​(@NotNull
                            @NotNull java.lang.String name)
        Description copied from interface: ITransaction
        Sets transaction name.
        Specified by:
        setName in interface ITransaction
        Parameters:
        name - - transaction name
      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Description copied from interface: ITransaction
        Returns transaction name.
        Specified by:
        getName in interface ITransaction
        Returns:
        transaction name
      • startChild

        @NotNull
        public @NotNull ISpan startChild​(@NotNull
                                         @NotNull java.lang.String operation)
        Description copied from interface: ISpan
        Starts a child Span.
        Specified by:
        startChild in interface ISpan
        Parameters:
        operation - - new span operation name
        Returns:
        a new transaction span
      • startChild

        @NotNull
        public @NotNull ISpan startChild​(@NotNull
                                         @NotNull java.lang.String operation,
                                         @Nullable
                                         @Nullable java.lang.String description,
                                         @Nullable
                                         @Nullable java.util.Date timestamp)
        Specified by:
        startChild in interface ISpan
      • startChild

        @NotNull
        public @NotNull ISpan startChild​(@NotNull
                                         @NotNull java.lang.String operation,
                                         @Nullable
                                         @Nullable java.lang.String description)
        Description copied from interface: ISpan
        Starts a child Span.
        Specified by:
        startChild in interface ISpan
        Parameters:
        operation - - new span operation name
        description - - new span description name
        Returns:
        a new transaction span
      • setRequest

        @Deprecated
        @ScheduledForRemoval
        public void setRequest​(@Nullable
                               @Nullable Request request)
        Deprecated.
        Description copied from interface: ITransaction
        Attaches request information to the transaction.
        Specified by:
        setRequest in interface ITransaction
        Parameters:
        request - the request
      • getRequest

        @Deprecated
        @ScheduledForRemoval
        @Nullable
        public @Nullable Request getRequest()
        Deprecated.
        Description copied from interface: ITransaction
        Returns the request information from the transaction
        Specified by:
        getRequest in interface ITransaction
        Returns:
        the request or null if not set
      • getDescription

        @Nullable
        public @Nullable java.lang.String getDescription()
        Description copied from interface: ISpan
        Returns the span description.
        Specified by:
        getDescription in interface ISpan
        Returns:
        the description
      • getSpans

        @NotNull
        public @NotNull java.util.List<Span> getSpans()
        Specified by:
        getSpans in interface ITransaction
      • getLatestActiveSpan

        @Nullable
        public @Nullable Span getLatestActiveSpan()
        Description copied from interface: ITransaction
        Returns the latest span that is not finished.
        Specified by:
        getLatestActiveSpan in interface ITransaction
        Returns:
        span or null if not found.
      • getEventId

        @NotNull
        public @NotNull SentryId getEventId()
        Description copied from interface: ITransaction
        Returns transaction's event id.
        Specified by:
        getEventId in interface ITransaction
        Returns:
        the event id
      • isFinished

        public boolean isFinished()
        Description copied from interface: ISpan
        Returns if span has finished.
        Specified by:
        isFinished in interface ISpan
        Returns:
        if span has finished.
      • toSentryTrace

        @NotNull
        public @NotNull SentryTraceHeader toSentryTrace()
        Description copied from interface: ISpan
        Returns the trace information that could be sent as a sentry-trace header.
        Specified by:
        toSentryTrace in interface ISpan
        Returns:
        SentryTraceHeader.
      • finish

        public void finish()
        Description copied from interface: ISpan
        Sets span timestamp marking this span as finished.
        Specified by:
        finish in interface ISpan
      • finish

        public void finish​(@Nullable
                           @Nullable SpanStatus status)
        Description copied from interface: ISpan
        Sets span timestamp marking this span as finished.
        Specified by:
        finish in interface ISpan
        Parameters:
        status - - the status
      • setOperation

        public void setOperation​(@NotNull
                                 @NotNull java.lang.String operation)
        Description copied from interface: ISpan
        Sets span operation.
        Specified by:
        setOperation in interface ISpan
        Parameters:
        operation - - the operation
      • getOperation

        @NotNull
        public @NotNull java.lang.String getOperation()
        Description copied from interface: ISpan
        Returns the span operation.
        Specified by:
        getOperation in interface ISpan
        Returns:
        the operation
      • setDescription

        public void setDescription​(@Nullable
                                   @Nullable java.lang.String description)
        Description copied from interface: ISpan
        Sets span description.
        Specified by:
        setDescription in interface ISpan
        Parameters:
        description - - the description.
      • setStatus

        public void setStatus​(@Nullable
                              @Nullable SpanStatus status)
        Description copied from interface: ISpan
        Sets span status.
        Specified by:
        setStatus in interface ISpan
        Parameters:
        status - - the status.
      • getStatus

        @Nullable
        public @Nullable SpanStatus getStatus()
        Description copied from interface: ISpan
        Returns the span status
        Specified by:
        getStatus in interface ISpan
        Returns:
        the status
      • setThrowable

        public void setThrowable​(@Nullable
                                 @Nullable java.lang.Throwable throwable)
        Description copied from interface: ISpan
        Sets the throwable that was thrown during the execution of the span.
        Specified by:
        setThrowable in interface ISpan
        Parameters:
        throwable - - the throwable.
      • getThrowable

        @Nullable
        public @Nullable java.lang.Throwable getThrowable()
        Description copied from interface: ISpan
        Gets the throwable that was thrown during the execution of the span.
        Specified by:
        getThrowable in interface ISpan
        Returns:
        throwable or null if none
      • getSpanContext

        @NotNull
        public @NotNull SpanContext getSpanContext()
        Description copied from interface: ISpan
        Gets the span context.
        Specified by:
        getSpanContext in interface ISpan
        Returns:
        the span context
      • setTag

        public void setTag​(@NotNull
                           @NotNull java.lang.String key,
                           @NotNull
                           @NotNull java.lang.String value)
        Description copied from interface: ISpan
        Sets the tag on span or transaction.
        Specified by:
        setTag in interface ISpan
        Parameters:
        key - the tag key
        value - the tag value
      • getTag

        @Nullable
        public @Nullable java.lang.String getTag​(@NotNull
                                                 @NotNull java.lang.String key)
        Specified by:
        getTag in interface ISpan
      • isSampled

        @Nullable
        public @Nullable java.lang.Boolean isSampled()
        Description copied from interface: ITransaction
        Returns if transaction is sampled.
        Specified by:
        isSampled in interface ITransaction
        Returns:
        is sampled
      • setData

        public void setData​(@NotNull
                            @NotNull java.lang.String key,
                            @NotNull
                            @NotNull java.lang.Object value)
        Description copied from interface: ISpan
        Sets extra data on span or transaction.
        Specified by:
        setData in interface ISpan
        Parameters:
        key - the data key
        value - the data value
      • getData

        @Nullable
        public @Nullable java.lang.Object getData​(@NotNull
                                                  @NotNull java.lang.String key)
        Description copied from interface: ISpan
        Returns extra data from span or transaction.
        Specified by:
        getData in interface ISpan
        Returns:
        the data