Skip to content

Change default behavior of sentry.reactive.thread-local-accessor-enabled to true #4020

@ririnto

Description

@ririnto

Problem Statement

Currently, SentryWebfluxAutoConfiguration registers the legacy filter (SentryWebfluxFilterConfiguration) whenever the property sentry.reactive.thread-local-accessor-enabled is not set. As a result, users who omit that property miss out on the benefits of the newer ThreadLocalAccessor-based filter.

Changing the default to SentryWebfluxFilterThreadLocalAccessorConfiguration would allow more users to benefit from improved context propagation without extra configuration.

Solution Brainstorm

Sentry 8.0.0 release candidate is in progress, so this is a good time to adjust the default behavior.

I propose:

  1. Add matchIfMissing = true to the @ConditionalOnProperty in SentryThreadLocalAccessorCondition.
  2. Remove matchIfMissing = true from SentryDisableThreadLocalAccessorCondition.

This way, SentryWebfluxFilterThreadLocalAccessorConfiguration is used when sentry.reactive.thread-local-accessor-enabled is not explicitly defined.

Users who still prefer the legacy filter can explicitly set sentry.reactive.thread-local-accessor-enabled=false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions