Skip to content

Resource detectors should not log at ERROR level when info not found #1538

Open
@cheempz

Description

@cheempz

Description of the bug

Per the resource SDK spec, failure to detect resource information must not be considered an error.

Currently when AWS and Container detectors are included, on startup they log ERROR level messages:

E, [2025-05-15T11:53:45.078373 #62040] ERROR -- : OpenTelemetry error: EC2 metadata service request failed - Failed to open TCP connection to 169.254.169.254:80 (No route to host - connect(2) for 169.254.169.254:80) - /.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:1214:in `__connect_nonblock'
E, [2025-05-15T11:53:45.079090 #62040] ERROR -- : OpenTelemetry error: EC2 metadata service request failed - Failed to open TCP connection to 169.254.169.254:80 (Host is down - connect(2) for 169.254.169.254:80) - /.rbenv/versions/3.1.2/lib/ruby/3.1.0/socket.rb:1214:in `__connect_nonblock'
E, [2025-05-15T11:53:45.080134 #62040] ERROR -- : OpenTelemetry error: Container resource detector - /proc/self/mountinfo could not be read.
E, [2025-05-15T11:53:45.080195 #62040] ERROR -- : OpenTelemetry error: Container resource detector - /proc/self/cgroup could not be read.

Could these be DEBUG level logs instead?

Share details about your runtime

Operating system details: MacOS
RUBY_ENGINE: "ruby"
RUBY_VERSION: "3.1.2"
RUBY_DESCRIPTION: "ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin24]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions