pub struct Highlight(/* private fields */);
Implementations§
Source§impl Highlight
impl Highlight
Sourcepub fn init(config: HighlightConfig) -> Result<Highlight, HighlightError>
pub fn init(config: HighlightConfig) -> Result<Highlight, HighlightError>
Initialize Highlight.
Sourcepub fn capture_error_with_session(
&self,
err: &dyn Error,
session_id: Option<String>,
request_id: Option<String>,
)
pub fn capture_error_with_session( &self, err: &dyn Error, session_id: Option<String>, request_id: Option<String>, )
Capture an error with session info
Like Highlight::capture_error, but also lets you provide your session_id and request_id
Sourcepub fn capture_error(&self, err: &dyn Error)
pub fn capture_error(&self, err: &dyn Error)
Capture an error
Explicitly captures any type with trait Error and sends it to Highlight.
Sourcepub fn span(&self, name: impl Into<Cow<'static, str>>) -> Span
pub fn span(&self, name: impl Into<Cow<'static, str>>) -> Span
Create a span
Creates a span for tracing. You can end it with span.end() by importing highlightio::SpanTrait.
Sourcepub fn project_id(&self) -> String
pub fn project_id(&self) -> String
Returns the project ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Highlight
impl !RefUnwindSafe for Highlight
impl Send for Highlight
impl Sync for Highlight
impl Unpin for Highlight
impl !UnwindSafe for Highlight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request