Skip to content

StackOverflowError when using propagation type customย #1987

@qavid

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions