mirror of
https://github.com/openai/codex.git
synced 2026-11-04 00:24:43 +00:00
fix(app-server): set originator header from initialize (re-revert) (#8988)
Reapplies https://github.com/openai/codex/pull/8873 which was reverted due to merge conflicts
This commit is contained in:
1 parent
2a06d64bc9
commit
fbe883318d
15 files changed
+353
-46
No files matched your search
@@ -15,6 +15,7 @@ use std::error::Error;
|
||||
pub fn build_provider(
|
||||
config: &Config,
|
||||
service_version: &str,
|
||||
service_name_override: Option<&str>,
|
||||
default_analytics_enabled: bool,
|
||||
) -> Result<Option<OtelProvider>, Box<dyn Error>> {
|
||||
let to_otel_exporter = |kind: &Kind| match kind {
|
||||
@@ -74,8 +75,11 @@ pub fn build_provider(
|
||||
OtelExporter::None
|
||||
};
|
||||
|
||||
let originator = originator();
|
||||
let service_name = service_name_override.unwrap_or(originator.value.as_str());
|
||||
|
||||
OtelProvider::from(&OtelSettings {
|
||||
service_name: originator().value.to_owned(),
|
||||
service_name: service_name.to_string(),
|
||||
service_version: service_version.to_string(),
|
||||
codex_home: config.codex_home.clone(),
|
||||
environment: config.otel.environment.to_string(),
|
||||
|
||||
Reference in new issue
Block a user