Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions codex-rs/core/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,14 @@
"description": "Log user prompt in traces",
"type": "boolean"
},
"metrics_exporter": {
"allOf": [
{
"$ref": "#/definitions/OtelExporterKind"
}
],
"description": "Optional metrics exporter"
},
"trace_exporter": {
"allOf": [
{
Expand Down
3 changes: 2 additions & 1 deletion codex-rs/core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1772,12 +1772,13 @@ impl Config {
.unwrap_or(DEFAULT_OTEL_ENVIRONMENT.to_string());
let exporter = t.exporter.unwrap_or(OtelExporterKind::None);
let trace_exporter = t.trace_exporter.unwrap_or_else(|| exporter.clone());
let metrics_exporter = t.metrics_exporter.unwrap_or(OtelExporterKind::Statsig);
OtelConfig {
log_user_prompt,
environment,
exporter,
trace_exporter,
metrics_exporter: OtelExporterKind::Statsig,
metrics_exporter,
}
},
};
Expand Down
3 changes: 3 additions & 0 deletions codex-rs/core/src/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ pub struct OtelConfigToml {

/// Optional trace exporter
pub trace_exporter: Option<OtelExporterKind>,

/// Optional metrics exporter
pub metrics_exporter: Option<OtelExporterKind>,
}

/// Effective OTEL settings after defaults are applied.
Expand Down
Loading