opentelemetry_datadog_cloudflare/exporter/model/
mod.rs

1use opentelemetry::sdk::export::ExportError;
2
3/// Wrap type for errors from opentelemetry datadog exporter
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6    /// Message pack error
7    #[error("message pack error")]
8    MessagePackError,
9    /// No http client founded. User should provide one or enable features
10    #[error("http client must be set, users can enable reqwest or reqwest feature to use http client implementation within create")]
11    NoHttpClient,
12    /// Http requests failed with following errors
13    #[error(transparent)]
14    RequestError(#[from] http::Error),
15    /// The Uri was invalid
16    #[error(transparent)]
17    InvalidUri(#[from] http::uri::InvalidUri),
18    /// Other errors
19    #[error("{0}")]
20    Other(String),
21}
22
23impl ExportError for Error {
24    fn exporter_name(&self) -> &'static str {
25        "datadog-traces"
26    }
27}