added trace name (#1043)

Fixed https://github.com/logspace-ai/langflow/issues/1042
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-11 15:51:07 -03:00 committed by GitHub
commit 562ebdec6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ def get_langfuse_callback(trace_id):
if langfuse := LangfuseInstance.get():
logger.debug("Langfuse credentials found")
try:
trace = langfuse.trace(CreateTrace(id=trace_id))
trace = langfuse.trace(CreateTrace(name="langflow-"+trace_id, id=trace_id))
return trace.getNewHandler()
except Exception as exc:
logger.error(f"Error initializing langfuse callback: {exc}")