Struct zipkin::OpenSpan [] [src]

pub struct OpenSpan { /* fields omitted */ }

An open span.

This is a guard object - the span will be finished and reported when it falls out of scope.

An open span is either a "local", "client", or "server" span. Local spans are for operations that are local and do not talk to remote services. Client spans are for operations that involve making a request to a remote service. Server spans are for the other end of that - a server which receives a requests from a remote client.

This controls how the span is reported - local spans have an "lc" binary annotation identifying the local endpoint, client spans have "cs" and "cr" annotations indicating the times at which the request was sent and the response was received, and server spans have "sr" and "ss" annotations indicating the times at which the request was received and the response was sent.

A span defaults to being local - use the client() and server() methods to change that for an individual span.

Methods

impl OpenSpan
[src]

[src]

Returns the context associated with this span.

[src]

Sets this span to be a server span.

When completed, server spans have "sr" and "ss" annotations automatically attached.

[src]

Sets this span to be a client span.

When completed, client spans have "cs" and "cr" annotations automatically attached.

[src]

Attaches an annotation to this span.

[src]

Attaches a binary annotation to this span.

Trait Implementations

impl Drop for OpenSpan
[src]

[src]

Executes the destructor for this type. Read more