pub struct JaegerCompactReporter(_);
Expand description

Reporter for the agent which accepts jaeger.thrift over compact thrift protocol.

Implementations§

source§

impl JaegerCompactReporter

source

pub fn new(service_name: &str) -> Result<Self>

Makes a new JaegerCompactReporter instance.

Errors

If the UDP socket used to report spans can not be bound to 0.0.0.0:0, it will return an error which has the kind ErrorKind::Other.

source

pub fn set_agent_addr(&mut self, addr: SocketAddr)

Sets the address of the report destination agent to addr.

The default address is 127.0.0.1:6831.

Note that you may also need to call set_reporter_addr if the addr is IPv6 or non localhost address.

source

pub fn set_reporter_addr(&mut self, addr: SocketAddr) -> Result<()>

Sets the address to which the reporter bind.

The default address is 127.0.0.1:0.

source

pub fn add_service_tag(&mut self, tag: Tag)

Adds tag to this service.

source

pub fn report(&self, spans: &[FinishedSpan]) -> Result<()>

Reports spans.

Errors

If it fails to encode spans to the thrift compact format (i.e., a bug of this crate), this method will return an error which has the kind ErrorKind::InvalidInput.

If it fails to send the encoded binary to the jaeger agent via UDP, this method will return an error which has the kind ErrorKind::Other.

Trait Implementations§

source§

impl Debug for JaegerCompactReporter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V