Struct rustracing_jaeger::reporter::JaegerCompactReporter
source · pub struct JaegerCompactReporter(_);
Expand description
Reporter for the agent which accepts jaeger.thrift over compact thrift protocol.
Implementations
sourceimpl JaegerCompactReporter
impl JaegerCompactReporter
sourcepub fn new(service_name: &str) -> Result<Self>
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 127.0.0.1:0
,
it will return an error which has the kind ErrorKind::Other
.
sourcepub fn set_agent_addr(&mut self, addr: SocketAddr)
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
.
sourcepub fn add_service_tag(&mut self, tag: Tag)
pub fn add_service_tag(&mut self, tag: Tag)
Adds tag
to this service.
sourcepub fn report(&self, spans: &[FinishedSpan]) -> Result<()>
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
Auto Trait Implementations
impl RefUnwindSafe for JaegerCompactReporter
impl Send for JaegerCompactReporter
impl Sync for JaegerCompactReporter
impl Unpin for JaegerCompactReporter
impl UnwindSafe for JaegerCompactReporter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more