[][src]Trait opentelemetry::sdk::resource::ResourceDetector

pub trait ResourceDetector {
    fn detect(&self, timeout: Duration) -> Resource;
}

ResourceDetector detects OpenTelemetry resource information

Implementations of this trait can be passed to the Resource::from_detectors function to generate a Resource from the merged information.

Required methods

fn detect(&self, timeout: Duration) -> Resource

detect returns an initialized Resource based on gathered information.

timeout is used in case the detection operation takes too much time.

If source information to construct a Resource is inaccessible, an empty Resource should be returned

If source information to construct a Resource is invalid, for example, missing required values. an empty Resource should be returned.

Loading content...

Implementors

impl ResourceDetector for EnvResourceDetector[src]

Loading content...