Skip to content

Xray propagator not resolved in Spring Boot project #9917

Description

@rBrda

Describe the bug

Propagator "xray" cannot be resolved since the classpath in the CompositeTextMapPropagatorFactory can't be resolved.

The factory imports the Xray propagator as following:

import io.opentelemetry.contrib.awsxray.propagator.AwsXrayPropagator;

but then tries to check its class path like this:

isOnClasspath("io.opentelemetry.contrib.awsxray.AwsXrayPropagator")

Spring Boot version: 2.6.6
Otel version: 1.22.0

I also checked newer Otel release versions on Github, they are most probably also affected by the issue.

application.yaml

otel:
  exporter:
    otlp:
      metrics:
        enabled: false
  traces:
    exporter: otlp
  propagation:
    enabled: true
    type: xray

gradle.build

implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter:1.22.0-alpha")
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray:1.22.0")
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.22.0-alpha")
implementation("io.micrometer:micrometer-tracing:1.1.6")
runtimeOnly("io.micrometer:micrometer-registry-otlp:1.11.5")
runtimeOnly("io.micrometer:micrometer-tracing-bridge-otel:1.1.6")

Steps to reproduce

Create a sample Spring Boot project using the configuration I provided above, and try to use "xray" as the propagator.

Expected behavior

Xray propagator is resolved.

Actual behavior

CompositeTextMapPropagatorFactory::getCompositeTextMapPropagator() is not able to resolve the configured propagator.

Javaagent or library instrumentation version

1.22.0

Environment

JDK: JDK 11.0.13
OS: MacOS 13.6

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    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