Browse Source

fix: improve tracing provider validation logic in OpsTraceManager (#20042)

tags/1.4.1
jameshui1997 5 months ago
parent
commit
648393cc7b
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      api/core/ops/ops_trace_manager.py

+ 4
- 1
api/core/ops/ops_trace_manager.py View File

@@ -292,11 +292,14 @@ class OpsTraceManager:
:return:
"""
# auth check
if tracing_provider is not None:
if enabled == True:
try:
provider_config_map[tracing_provider]
except KeyError:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")
else:
if tracing_provider is not None:
raise ValueError(f"Invalid tracing provider: {tracing_provider}")

app_config: Optional[App] = db.session.query(App).filter(App.id == app_id).first()
if not app_config:

Loading…
Cancel
Save