pub trait ResourceDetector {
// Required method
fn detect(&self) -> Resource;
}Expand description
ResourceDetector detects OpenTelemetry resource information
Implementations of this trait can be passed to
the ResourceBuilder::with_detectors function to generate a Resource from the merged information.
Required Methods§
Sourcefn detect(&self) -> Resource
fn detect(&self) -> Resource
detect returns an initialized Resource based on gathered information.
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".