Class ReactorUtils

java.lang.Object
io.sentry.spring.jakarta.webflux.ReactorUtils

@Experimental public final class ReactorUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> reactor.core.publisher.Flux<T>
    withSentry(@NotNull reactor.core.publisher.Flux<T> flux)
    Writes the current Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.
    static <T> reactor.core.publisher.Mono<T>
    withSentry(@NotNull reactor.core.publisher.Mono<T> mono)
    Writes the current Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.
    static <T> reactor.core.publisher.Flux<T>
    withSentryHub(@NotNull reactor.core.publisher.Flux<T> flux, @NotNull IHub hub)
    Writes the given Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.
    static <T> reactor.core.publisher.Mono<T>
    withSentryHub(@NotNull reactor.core.publisher.Mono<T> mono, @NotNull IHub hub)
    Writes the given Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.
    static <T> reactor.core.publisher.Flux<T>
    withSentryNewMainHubClone(@NotNull reactor.core.publisher.Flux<T> flux)
    Writes a new Sentry IHub cloned from the main hub to the Context and uses ThreadLocalAccessor to propagate it.
    static <T> reactor.core.publisher.Mono<T>
    withSentryNewMainHubClone(@NotNull reactor.core.publisher.Mono<T> mono)
    Writes a new Sentry IHub cloned from the main hub to the Context and uses ThreadLocalAccessor to propagate it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReactorUtils

      public ReactorUtils()
  • Method Details

    • withSentry

      @Experimental public static <T> reactor.core.publisher.Mono<T> withSentry(@NotNull @NotNull reactor.core.publisher.Mono<T> mono)
      Writes the current Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)

    • withSentryNewMainHubClone

      @Experimental public static <T> reactor.core.publisher.Mono<T> withSentryNewMainHubClone(@NotNull @NotNull reactor.core.publisher.Mono<T> mono)
      Writes a new Sentry IHub cloned from the main hub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)

    • withSentryHub

      @Experimental public static <T> reactor.core.publisher.Mono<T> withSentryHub(@NotNull @NotNull reactor.core.publisher.Mono<T> mono, @NotNull @NotNull IHub hub)
      Writes the given Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)

    • withSentry

      @Experimental public static <T> reactor.core.publisher.Flux<T> withSentry(@NotNull @NotNull reactor.core.publisher.Flux<T> flux)
      Writes the current Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)

    • withSentryNewMainHubClone

      @Experimental public static <T> reactor.core.publisher.Flux<T> withSentryNewMainHubClone(@NotNull @NotNull reactor.core.publisher.Flux<T> flux)
      Writes a new Sentry IHub cloned from the main hub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)

    • withSentryHub

      @Experimental public static <T> reactor.core.publisher.Flux<T> withSentryHub(@NotNull @NotNull reactor.core.publisher.Flux<T> flux, @NotNull @NotNull IHub hub)
      Writes the given Sentry IHub to the Context and uses ThreadLocalAccessor to propagate it.

      This requires - reactor.core.publisher.Hooks#enableAutomaticContextPropagation() to be enabled - having `io.micrometer:context-propagation:1.0.2+` (provided by Spring Boot 3.0.3+) - having `io.projectreactor:reactor-core:3.5.3+` (provided by Spring Boot 3.0.3+)