Skip to content

[exporter/awsxrayexporter] validate command fails because it tries to check even an execution environment #40450

Open
@rmatsuoka

Description

@rmatsuoka

Component(s)

exporter/awsxray

What happened?

Description

When upgrading OpenTelemetry Collector from v0.119.0 to v0.127.0, config file validation started failing.

During validation, awsxray exporter seems to try to fetch AWS environment information (such as environment variables, ec2 metadata, ...) though the validation runs on my computer.

Is this behavior, where it tries to validate an execution environment, a bug?
I believe that validate command is intended for validating the config file itself and should not check the execution environment, as it's most often run on local machines or in CI environments.

Steps to Reproduce

otelcol validate --config ./config.yaml

Expected Result

No output. Validation would succeed as did on v0.119.0.

Actual Result

Error: failed to build pipelines: failed to create "awsxray" exporter for data type "traces": cannot fetch region variable from config file, environment variables and ec2 metadata
2025/06/03 10:08:43 collector server run finished with error: failed to build pipelines: failed to create "awsxray" exporter for data type "traces": cannot fetch region variable from config file, environment variables and ec2 metadata

Collector version

v0.127.0

Environment information

Environment

OS: Docker on macOS

OpenTelemetry Collector configuration

---

receivers:
  otlp:
    protocols:
      grpc:

processors:
  batch:

exporters:
  awsxray:

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [awsxray]

Log output

Error: failed to build pipelines: failed to create "awsxray" exporter for data type "traces": cannot fetch region variable from config file, environment variables and ec2 metadata
2025/06/03 10:08:43 collector server run finished with error: failed to build pipelines: failed to create "awsxray" exporter for data type "traces": cannot fetch region variable from config file, environment variables and ec2 metadata

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions