pub struct ServiceIdentity { /* private fields */ }Expand description
Stable identity and build metadata for one running process.
Implementations§
Source§impl ServiceIdentity
impl ServiceIdentity
Sourcepub fn new(
product: impl Into<String>,
process: ProcessKind,
version: impl Into<String>,
commit: impl Into<String>,
environment: DeploymentEnvironment,
) -> Self
pub fn new( product: impl Into<String>, process: ProcessKind, version: impl Into<String>, commit: impl Into<String>, environment: DeploymentEnvironment, ) -> Self
Creates a service identity.
Sourcepub const fn process(&self) -> ProcessKind
pub const fn process(&self) -> ProcessKind
Returns this process’s kind.
Sourcepub const fn environment(&self) -> DeploymentEnvironment
pub const fn environment(&self) -> DeploymentEnvironment
Returns the deployment environment.
Sourcepub fn service_name(&self) -> String
pub fn service_name(&self) -> String
Composes the OpenTelemetry service.name value.
Trait Implementations§
Source§impl Clone for ServiceIdentity
impl Clone for ServiceIdentity
Source§impl Debug for ServiceIdentity
impl Debug for ServiceIdentity
impl Eq for ServiceIdentity
Source§impl PartialEq for ServiceIdentity
impl PartialEq for ServiceIdentity
impl StructuralPartialEq for ServiceIdentity
Auto Trait Implementations§
impl Freeze for ServiceIdentity
impl RefUnwindSafe for ServiceIdentity
impl Send for ServiceIdentity
impl Sync for ServiceIdentity
impl Unpin for ServiceIdentity
impl UnsafeUnpin for ServiceIdentity
impl UnwindSafe for ServiceIdentity
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