use thiserror::Error;

#[derive(Debug, Error)]
pub enum TelemetryError {
    #[error("Tracer initialization failed: {0}")]
    TracerInitFailed(String),

    #[error("Jaeger exporter error: {0}")]
    JaegerError(String),

    #[error("Metrics initialization failed: {0}")]
    MetricsInitFailed(String),

    #[error("Span creation failed: {0}")]
    SpanCreationFailed(String),

    #[error("Invalid metric name: {0}")]
    InvalidMetricName(String),

    #[error("OpenTelemetry error: {0}")]
    OtelError(String),
}

pub type Result<T> = std::result::Result<T, TelemetryError>;
