[−][src]Struct opentracingrust_zipkin::ZipkinEndpoint
Indicates the network context of a service recording an annotation with two exceptions.
When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR, the endpoint indicates the source or destination of an RPC. This exception allows zipkin to display network context of uninstrumented services, or clients such as web browsers.
Fields
ipv4: Option<i32>
IPv4 host address packed into 4 bytes.
Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
port: Option<i16>
IPv4 port or 0, if unknown.
Note: this is to be treated as an unsigned integer, so watch for negatives.
service_name: Option<String>
Classifier of a source or destination in lowercase, such as "zipkin-web".
This is the primary parameter for trace lookup, so should be intuitive as possible, for example, matching names in service discovery.
Conventionally, when the service name isn't known, service_name = "unknown". However, it is also permissible to set service_name = "" (empty string). The difference in the latter usage is that the span will not be queryable by service name unless more information is added to the span with non-empty service name, e.g. an additional annotation from the server.
Particularly clients may not have a reliable service name at ingest. One approach is to set service_name to "" at ingest, and later assign a better label based on binary annotations, such as user agent.
ipv6: Option<Vec<u8>>
IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes()
Methods
impl Endpoint
[src]
pub fn new<F1, F2, F3, F4>(
ipv4: F1,
port: F2,
service_name: F3,
ipv6: F4
) -> Endpoint where
F1: Into<Option<i32>>,
F2: Into<Option<i16>>,
F3: Into<Option<String>>,
F4: Into<Option<Vec<u8>>>,
[src]
ipv4: F1,
port: F2,
service_name: F3,
ipv6: F4
) -> Endpoint where
F1: Into<Option<i32>>,
F2: Into<Option<i16>>,
F3: Into<Option<String>>,
F4: Into<Option<Vec<u8>>>,
pub fn read_from_in_protocol(
i_prot: &mut dyn TInputProtocol
) -> Result<Endpoint>
[src]
i_prot: &mut dyn TInputProtocol
) -> Result<Endpoint>
pub fn write_to_out_protocol(
&self,
o_prot: &mut dyn TOutputProtocol
) -> Result<()>
[src]
&self,
o_prot: &mut dyn TOutputProtocol
) -> Result<()>
Trait Implementations
impl Clone for Endpoint
[src]
impl Debug for Endpoint
[src]
impl Default for Endpoint
[src]
impl Eq for Endpoint
[src]
impl Hash for Endpoint
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Endpoint
[src]
fn cmp(&self, other: &Endpoint) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Endpoint> for Endpoint
[src]
impl PartialOrd<Endpoint> for Endpoint
[src]
fn partial_cmp(&self, other: &Endpoint) -> Option<Ordering>
[src]
fn lt(&self, other: &Endpoint) -> bool
[src]
fn le(&self, other: &Endpoint) -> bool
[src]
fn gt(&self, other: &Endpoint) -> bool
[src]
fn ge(&self, other: &Endpoint) -> bool
[src]
impl StructuralEq for Endpoint
[src]
impl StructuralPartialEq for Endpoint
[src]
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,