Annotation Interface SentryTransaction


@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface SentryTransaction
Marker annotation for methods or classes that should be treated as Sentry transactions.
You must use self-injected bean for calling if you want to call method within the class itself in order for this annotation to take action.
This is due to the fact that the actual method calls are intercepted only by proxies, not the instance itself.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to bind the transaction to the current scope.
    boolean
    Whether to capture exceptions in the transaction.
    Configurator class to customize the transaction.
    Name of the transaction.
    boolean
    Whether to create span only if there's an active transaction in current scope.
    Operation of the transaction.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • name

      String name
      Name of the transaction. If not specified, it will be set to class name and method name.
      Returns:
      the name of the transaction
      Default:
      "$default-name$"
    • operation

      String operation
      Operation of the transaction.
      Returns:
      the description of the transaction
      Default:
      ""
    • bindToScope

      boolean bindToScope
      Whether to bind the transaction to the current scope. If set to false, the transaction will not be bound to the current scope.
      Returns:
      true if the transaction should be bound to the current scope, false otherwise
      Default:
      true
    • onlySpan

      boolean onlySpan
      Whether to create span only if there's an active transaction in current scope.
      Returns:
      true if the transaction should only create a span if there's an active transaction, false otherwise
      Default:
      false
    • captureExceptions

      boolean captureExceptions
      Whether to capture exceptions in the transaction. If set to false, exceptions will not be captured in the transaction.
      Returns:
      true if exceptions should be captured, false otherwise
      Default:
      true
    • configurator

      Class<? extends TransactionConfigurator> configurator
      Configurator class to customize the transaction. This class must have no-arg constructor. Will be called before the transaction is started. Is cached for performance. If not specified, no customization will be applied.
      Returns:
      the configurator class
      Default:
      enterprises.iwakura.sigewine.aop.sentry.NoopTransactionConfigurator.class