The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(relay): keep migrated Relay configs off 0.10's OTLP auto-export
Teknium5ba559c9e4b1
diff --git a/hermes_cli/relay_plugin_migrate.py b/hermes_cli/relay_plugin_migrate.pyindex 6445626f29d..6ff6e45001f 100644--- a/hermes_cli/relay_plugin_migrate.py+++ b/hermes_cli/relay_plugin_migrate.py@@ -74,7 +74,10 @@ def relay_plugin_payload_from_legacy_env(env: Mapping[str, Any]) -> dict[str, Anmode="overwrite" if mode == "overwrite" else "append",)atof = obs.AtofConfig(enabled=True, sinks=[sink])- spec = obs.ComponentSpec(config=obs.ObservabilityConfig(atif=atif, atof=atof))+ # Relay 0.10 auto-exports gen_ai traces (prompt/response content) to any OTEL_EXPORTER_OTLP_*+ # endpoint in the process env; the legacy vars never exported OTLP, so keep that off.+ otel_off = obs.OpenTelemetrySectionConfig(enabled=False)+ spec = obs.ComponentSpec(config=obs.ObservabilityConfig(atif=atif, atof=atof, opentelemetry=otel_off))return {"version": 1, "components": [spec.to_dict()]}diff --git a/tests/agent/test_relay_runtime_plugins.py b/tests/agent/test_relay_runtime_plugins.pyindex 63a29d7450d..e6d42bc2771 100644--- a/tests/agent/test_relay_runtime_plugins.py+++ b/tests/agent/test_relay_runtime_plugins.py@@ -1112,6 +1112,11 @@ mode = "overwrite"host = relay_runtime.RelayRuntime(relay=relay, profile_key="profile")try:+ assert not host.managed_execution_enabled()+ assert (+ host._plugin_configuration_state+ is relay_runtime._RelayPluginConfigurationState.DISABLED+ )report = relay_runtime._PLUGIN_CONFIGURATION._activation.reportconfig_paths = set(report["config_paths"])assert str(user_config) in config_pathsdiff --git a/tests/hermes_cli/test_relay_plugin_migrate.py b/tests/hermes_cli/test_relay_plugin_migrate.pyindex 7ed96bf937e..0c58251bf80 100644--- a/tests/hermes_cli/test_relay_plugin_migrate.py+++ b/tests/hermes_cli/test_relay_plugin_migrate.py@@ -57,6 +57,8 @@ def test_legacy_env_becomes_validated_toml_selected_from_env(profile_env):sink = document["components"][0]["config"]["atof"]["sinks"][0]assert sink["type"] == "file" and sink["filename"] == "hermes-atof.jsonl"assert document["components"][0]["config"]["atif"]["filename_template"] == "trajectory-{session_id}.json"+ # Migrated exporters never sent OTLP; Relay 0.10's env-driven auto-export must stay off.+ assert document["components"][0]["config"]["opentelemetry"]["enabled"] is False# Relay accepts the complete document generated from the legacy settings.report = nemo_relay.plugin.validate_exact(document)assert report["config"]["diagnostics"] == []diff --git a/website/docs/developer-guide/relay-shared-metrics.md b/website/docs/developer-guide/relay-shared-metrics.mdindex eed6dca051a..0344c7c66f0 100644--- a/website/docs/developer-guide/relay-shared-metrics.md+++ b/website/docs/developer-guide/relay-shared-metrics.md@@ -44,6 +44,14 @@ execution intercepts must update their callbacks and regenerate their protocolbindings. See Relay's [0.10 migration guide](https://docs.nvidia.com/nemo/relay/reference/migration-guides)for the complete upgrade checklist.+Relay 0.10 also starts OpenTelemetry export on its own when an active Relay+configuration meets a nonblank `OTEL_EXPORTER_OTLP_ENDPOINT` (or a per-signal+`OTEL_EXPORTER_OTLP_*_ENDPOINT`) in the Hermes process environment. Those+`gen_ai` spans carry prompt and response messages. Files generated by+`hermes migrate relay` set `[components.config.opentelemetry] enabled = false`+to keep the 0.9 behavior; add the same section to a hand-written file, or set+`OTEL_SDK_DISABLED=true`, unless you want that export.+When Relay managed execution is active, the provider request and response passthrough that native module in the Hermes process so configured interceptors canoperate on the real call. This is separate from the shared-metrics datadiff --git a/website/docs/user-guide/features/built-in-plugins.md b/website/docs/user-guide/features/built-in-plugins.mdindex e0d0b776ac7..f0f587aad4d 100644--- a/website/docs/user-guide/features/built-in-plugins.md+++ b/website/docs/user-guide/features/built-in-plugins.md@@ -247,6 +247,10 @@ model_name = "unknown"output_directory = "/home/you/.hermes/telemetry/nemo-relay/atif"filename_template = "trajectory-{session_id}.json"+[components.config.opentelemetry]+enabled = false+endpoints = []+[components.config.policy]unknown_component = "warn"unknown_field = "warn"