fix(otel): point AgentOps OTLP exporter at otlp.agentops.ai (#31490)

The AgentOps preset hardcoded https://otlp.agentops.cloud/v1/traces, a domain
that no longer resolves (NXDOMAIN), so every span silently failed to export with
a NameResolutionError in the BatchSpanProcessor worker. The live ingest host is
otlp.agentops.ai (the auth host api.agentops.ai was already correct). Pin the
endpoint to the resolvable host and add a regression test on the constant.
This commit is contained in:
yucheng-berri 2026-06-26 20:39:39 -07:00 committed by GitHub
parent ef66620223
commit 0216c969b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -23,7 +23,7 @@ from litellm.integrations.otel.model.config import (
)
from litellm.integrations.otel.plumbing.providers import register_exporter_factory
_AGENTOPS_ENDPOINT = "https://otlp.agentops.cloud/v1/traces"
_AGENTOPS_ENDPOINT = "https://otlp.agentops.ai/v1/traces"
_AGENTOPS_AUTH_ENDPOINT = "https://api.agentops.ai/v3/auth/token"
_AGENTOPS_EXPORTER_KIND = "agentops"

View file

@ -151,3 +151,12 @@ def test_fetch_jwt_uses_owned_client_not_shared_pool(monkeypatch):
result = _fetch_agentops_jwt("api-key")
assert result == {"token": "jwt-123"}
assert closed["n"] == 1 # the owned client was closed
def test_agentops_endpoint_points_at_live_host():
# Regression: the OTLP endpoint must be the resolvable AgentOps host. The
# deprecated otlp.agentops.cloud domain no longer resolves (NXDOMAIN), so
# spans silently failed to export with a NameResolutionError. Pin the host
# so a typo or stale domain can never ship again.
assert _AGENTOPS_ENDPOINT == "https://otlp.agentops.ai/v1/traces"
assert "agentops.cloud" not in _AGENTOPS_ENDPOINT