#[derive(Debug, thiserror::Error)]
pub enum TelemetryError {
#[error("internal error: {0}")]
Internal(String),
#[error("unable to configure traces exporter: {0}")]
TracesExporterSetup(String),
#[error("unable to configure metrics exporter: {0}")]
MetricsExporterSetup(String),
}
impl From<String> for TelemetryError {
fn from(s: String) -> Self {
TelemetryError::Internal(s)
}
}
impl From<&str> for TelemetryError {
fn from(s: &str) -> Self {
TelemetryError::Internal(s.to_string())
}
}