Skip to content

Commit

Permalink
fix: api/core/ops/ops_trace_manager.py (langgenius#8501)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn authored and 黎斌 committed Sep 26, 2024
1 parent 7c00cbc commit 2b2d01a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions api/core/ops/ops_trace_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,18 @@ def get_ops_trace_instance(
return None

app: App = db.session.query(App).filter(App.id == app_id).first()

if app is None:
return None

app_ops_trace_config = json.loads(app.tracing) if app.tracing else None

if app_ops_trace_config is not None:
tracing_provider = app_ops_trace_config.get("tracing_provider")
else:
if app_ops_trace_config is None:
return None

tracing_provider = app_ops_trace_config.get("tracing_provider")

if tracing_provider is None or tracing_provider not in provider_config_map:
return None

# decrypt_token
Expand Down

0 comments on commit 2b2d01a

Please sign in to comment.