Replies: 2 comments
-
Hey @dchang10! I'm here to help you with your bug report and answer any questions you have. I can also assist you in becoming a contributor to the repository. Let's squash those bugs together! The log traces are not printing consistently in You can set the logging level by adding the following line at the beginning of your script: logging.basicConfig(level=logging.DEBUG) Here is the updated code snippet with the logging level set: import json
import logging
import os
from datetime import datetime, timedelta
from langsmith import Client
from core.ops.base_trace_instance import BaseTraceInstance
from core.ops.entities.config_entity import LangSmithConfig
from core.ops.entities.trace_entity import (
BaseTraceInfo,
DatasetRetrievalTraceInfo,
GenerateNameTraceInfo,
MessageTraceInfo,
ModerationTraceInfo,
SuggestedQuestionTraceInfo,
ToolTraceInfo,
TraceTaskName,
WorkflowTraceInfo,
)
from core.ops.langsmith_trace.entities.langsmith_trace_entity import (
LangSmithRunModel,
LangSmithRunType,
LangSmithRunUpdateModel,
)
from core.ops.utils import filter_none_values
from extensions.ext_database import db
from models.model import EndUser, MessageFile
from models.workflow import WorkflowNodeExecution
logging.basicConfig(level=logging.DEBUG) # Set logging level to DEBUG
logger = logging.getLogger(__name__) This will ensure that all log messages, including |
Beta Was this translation helpful? Give feedback.
-
@dosu I was wondering when is the trace(self, trace_info: BaseTraceInfo) function in langsmith_trace.py triggered. |
Beta Was this translation helpful? Give feedback.
-
Self Checks
Dify version
0.7.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Start with Source code
I also added several prints and logs and debugs throughout

ops_trace_task.py
andlangsmith_trace.py
. Most of the time none of the logs I've written showed up. Sometimes some pops through here and there but could never consistently replicate the situation. Example as below:Why I think the following print should show:
I made sure the correct logs showed up in langsmith.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
Beta Was this translation helpful? Give feedback.
All reactions