Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.
This repository was archived by the owner on May 28, 2026. It is now read-only.

StackOverflowError when using propagation type custom #1987

Description

@qavid

Describe the bug
When using propagation type custom by setting property:
spring.sleuth.propagation.type=custom
StackOverflowError is thrown when Tracing bean is initialized.

As Tracing bean is lazily initialized, you can for example provide tracing customizer:

@Bean
public NettyServerCustomizer tracingCustomizer(HttpTracing httpTracing) {
    return server -> ReactorNettyHttpTracing.create(httpTracing).decorateHttpServer(server);
}

and exception will be thrown at startup.

Problem is reproducible with spring-cloud-sleuth version 3.0.3. Previous version 3.0.2 didn't have this problem.
Problem relates to newly introduced LazyPropagationFactory (in CompositePropagationFactory).

Sample
spring-cloud-samples/sleuth-issues#73

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions