Struct opentelemetry::sdk::resource::SdkProvidedResourceDetector
source · pub struct SdkProvidedResourceDetector;
Expand description
There are the attributes which MUST be provided by the SDK as specified in the Resource SDK specification. This detector detect those attributes and if the attribute cannot be detected, use the default value.
This detector will first try OTEL_SERVICE_NAME
env. If it’s not available.
Then it will check the OTEL_RESOURCE_ATTRIBUTES
env and see if it contains
service.name
resource. If it’s also not available. Then it will use
unknown_service
.
Note that if service.name
is empty. It will be ignore and the service name will
be unknown_service
. If users want to set an empty service name. They can provide
a resource with empty value and service.name
key.
Trait Implementations§
source§impl Debug for SdkProvidedResourceDetector
impl Debug for SdkProvidedResourceDetector
Auto Trait Implementations§
impl RefUnwindSafe for SdkProvidedResourceDetector
impl Send for SdkProvidedResourceDetector
impl Sync for SdkProvidedResourceDetector
impl Unpin for SdkProvidedResourceDetector
impl UnwindSafe for SdkProvidedResourceDetector
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more