diff --git a/backend/src/monitor.rs b/backend/src/monitor.rs index 867d2c8520..28b4987e79 100644 --- a/backend/src/monitor.rs +++ b/backend/src/monitor.rs @@ -732,6 +732,8 @@ struct OtelSetting { otel_exporter_otlp_protocol: Option, #[serde(default, deserialize_with = "empty_as_none")] otel_exporter_otlp_compression: Option, + #[serde(default, deserialize_with = "empty_as_none")] + otel_exporter_otlp_metrics_temporality_preference: Option, } pub async fn load_otel(db: &DB) { @@ -788,6 +790,14 @@ pub async fn load_otel(db: &DB) { std::env::set_var("OTEL_EXPORTER_OTLP_COMPRESSION", compression); } } + if let Some(temporality) = o.otel_exporter_otlp_metrics_temporality_preference { + unsafe { + std::env::set_var( + "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE", + temporality, + ); + } + } println!("OTEL settings loaded: tracing ({tracing_enabled}), logs ({logs_enabled}), metrics ({metrics_enabled}), endpoint ({:?}), headers defined: ({})", endpoint, headers.is_some()); } else { diff --git a/backend/windmill-common/src/instance_config.rs b/backend/windmill-common/src/instance_config.rs index e28bf139cf..bf93f887d3 100644 --- a/backend/windmill-common/src/instance_config.rs +++ b/backend/windmill-common/src/instance_config.rs @@ -631,6 +631,8 @@ pub struct OtelSettings { pub otel_exporter_otlp_protocol: Option, #[serde(skip_serializing_if = "Option::is_none")] pub otel_exporter_otlp_compression: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub otel_exporter_otlp_metrics_temporality_preference: Option, } /// Per-language HTTP request tracing proxy configuration. diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 7b6c5e312e..79e57e87ac 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -31,6 +31,7 @@ import IndexerJobIndexSettings from './instanceSettings/IndexerJobIndexSettings.svelte' import IndexerLogIndexSettings from './instanceSettings/IndexerLogIndexSettings.svelte' import TextInput from './text_input/TextInput.svelte' + import Select from './select/Select.svelte' import SettingCard from './instanceSettings/SettingCard.svelte' interface Props { @@ -694,6 +695,30 @@ +
+ +