mirror of
https://github.com/langgenius/dify.git
synced 2026-03-14 13:51:33 +08:00
try to fix exception logging
This commit is contained in:
parent
1a6aded8e0
commit
5617d69ca7
@ -66,12 +66,20 @@ def init_app(app: DifyApp):
|
||||
exporter = GRPCSpanExporter(
|
||||
endpoint=endpoint,
|
||||
# Header field names must consist of lowercase letters, check RFC7540
|
||||
headers=((("authorization", f"Bearer {dify_config.OTLP_API_KEY}"),) if dify_config.OTLP_API_KEY else None),
|
||||
headers=(
|
||||
(
|
||||
("authorization", f"Bearer {dify_config.OTLP_API_KEY}"),
|
||||
) if dify_config.OTLP_API_KEY else None
|
||||
),
|
||||
insecure=insecure,
|
||||
)
|
||||
metric_exporter = GRPCMetricExporter(
|
||||
endpoint=endpoint,
|
||||
headers=((("authorization", f"Bearer {dify_config.OTLP_API_KEY}"),) if dify_config.OTLP_API_KEY else None),
|
||||
headers=(
|
||||
(
|
||||
("authorization", f"Bearer {dify_config.OTLP_API_KEY}"),
|
||||
) if dify_config.OTLP_API_KEY else None
|
||||
),
|
||||
insecure=insecure,
|
||||
)
|
||||
else:
|
||||
|
||||
@ -51,7 +51,7 @@ def process_trace_tasks(file_info):
|
||||
try:
|
||||
EnterpriseOtelTrace().trace(trace_info)
|
||||
except Exception:
|
||||
logger.warning("Enterprise trace failed for app_id: %s", app_id, exc_info=True)
|
||||
logger.exception("Enterprise trace failed for app_id: %s", app_id)
|
||||
|
||||
if trace_instance:
|
||||
with current_app.app_context():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user