mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
Include real OS info in metrics. (#10425)
calculated a hashed user ID from either auth user id or API key Also correctly populates OS. These will make our metrics more useful and powerful for analysis.
This commit is contained in:
1 parent
040ecee715
commit
f2ffc4e5d0
8 files changed
+88
-32
No files matched your search
@@ -14,6 +14,7 @@ use crate::metrics::validation::validate_tag_key;
|
||||
use crate::metrics::validation::validate_tag_value;
|
||||
use crate::otel_provider::OtelProvider;
|
||||
use codex_protocol::ThreadId;
|
||||
pub use codex_utils_string::sanitize_metric_tag_value;
|
||||
use opentelemetry_sdk::metrics::data::ResourceMetrics;
|
||||
use serde::Serialize;
|
||||
use std::time::Duration;
|
||||
@@ -188,7 +189,7 @@ impl OtelManager {
|
||||
if !self.metrics_use_metadata_tags {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
let mut tags = Vec::with_capacity(6);
|
||||
let mut tags = Vec::with_capacity(5);
|
||||
Self::push_metadata_tag(&mut tags, "auth_mode", self.metadata.auth_mode.as_deref())?;
|
||||
Self::push_metadata_tag(
|
||||
&mut tags,
|
||||
|
||||
Reference in new issue
Block a user