[][src]Struct opentracingrust_zipkin::ZipkinEndpoint

pub struct ZipkinEndpoint {
    pub ipv4: Option<i32>,
    pub port: Option<i16>,
    pub service_name: Option<String>,
    pub ipv6: Option<Vec<u8>>,
}

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]

pub fn read_from_in_protocol(
    i_prot: &mut dyn TInputProtocol
) -> Result<Endpoint>
[src]

pub fn write_to_out_protocol(
    &self,
    o_prot: &mut dyn TOutputProtocol
) -> Result<()>
[src]

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]

impl Ord for Endpoint[src]

impl PartialEq<Endpoint> for Endpoint[src]

impl PartialOrd<Endpoint> for Endpoint[src]

impl StructuralEq for Endpoint[src]

impl StructuralPartialEq for Endpoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,