[−][src]Struct appinsights::telemetry::RemoteDependencyTelemetry
Represents interactions of the monitored component with a remote component/service like SQL or an HTTP endpoint.
Examples
use appinsights::telemetry::{Telemetry, RemoteDependencyTelemetry}; use std::time::Duration; // create a telemetry item let mut telemetry = RemoteDependencyTelemetry::new( "GET https://api.github.com/dmolokanov/appinsights-rs".to_string(), "HTTP".into(), Duration::from_secs(2), "api.github.com".to_string(), true, ); // attach custom properties, measurements and context tags telemetry.properties_mut().insert("component".to_string(), "data_processor".to_string()); telemetry.tags_mut().insert("os_version".to_string(), "linux x86_64".to_string()); telemetry.measurements_mut().insert("body_size".to_string(), 115.0); // submit telemetry item to server client.track(telemetry);
Methods
impl RemoteDependencyTelemetry
[src]
pub fn new(
name: String,
dependency_type: String,
duration: StdDuration,
target: String,
success: bool
) -> Self
[src]
name: String,
dependency_type: String,
duration: StdDuration,
target: String,
success: bool
) -> Self
Creates a new telemetry item with specified name, dependency type, target site and success status.
pub fn measurements(&self) -> &Measurements
[src]
Returns custom measurements to submit with the telemetry item.
pub fn measurements_mut(&mut self) -> &mut Measurements
[src]
Returns mutable reference to custom measurements.
Trait Implementations
impl Telemetry for RemoteDependencyTelemetry
[src]
fn timestamp(&self) -> DateTime<Utc>
[src]
Returns the time when this telemetry was measured.
fn properties(&self) -> &Properties
[src]
Returns custom properties to submit with the telemetry item.
fn properties_mut(&mut self) -> &mut Properties
[src]
Returns mutable reference to custom properties.
fn tags(&self) -> &ContextTags
[src]
Returns context data containing extra, optional tags. Overrides values found on client telemetry context.
fn tags_mut(&mut self) -> &mut ContextTags
[src]
Returns mutable reference to custom tags.
Auto Trait Implementations
impl RefUnwindSafe for RemoteDependencyTelemetry
impl Send for RemoteDependencyTelemetry
impl Sync for RemoteDependencyTelemetry
impl Unpin for RemoteDependencyTelemetry
impl UnwindSafe for RemoteDependencyTelemetry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,