This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/vendor/codex/codex-rs/otel/src/targets.rs

11 lines
447 B
Rust

pub(crate) const OTEL_TARGET_PREFIX: &str = "codex_otel";
pub(crate) const OTEL_LOG_ONLY_TARGET: &str = "codex_otel.log_only";
pub(crate) const OTEL_TRACE_SAFE_TARGET: &str = "codex_otel.trace_safe";
pub(crate) fn is_log_export_target(target: &str) -> bool {
target.starts_with(OTEL_TARGET_PREFIX) && !is_trace_safe_target(target)
}
pub(crate) fn is_trace_safe_target(target: &str) -> bool {
target.starts_with(OTEL_TRACE_SAFE_TARGET)
}