Skip to content
Discussion options

You must be logged in to vote

Thank you @eschullert and @thomasgtaylor, I agree it would be better if the metadata attached to the config of the langgraph invocation would be attached to the top-level span. Looping in @hassiebp to check if this is possible.

The second option to add attributes (including metadata) to a trace is by using an enclosing span. This should populate the metadata to the top-level trace (documented here):

from langfuse import get_client
from langfuse.langchain import CallbackHandler
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
 
langfuse = get_client()
langfuse_handler = CallbackHandler()
 
llm = ChatOpenAI(model_name="gpt-4o")
prompt = ChatPromp…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@eschullert
Comment options

Comment options

You must be logged in to vote
8 replies
@jannikmaierhoefer
Comment options

@thomasgtaylor
Comment options

@eschullert
Comment options

@jannikmaierhoefer
Comment options

Answer selected by eschullert
@eschullert
Comment options

@thomasgtaylor
Comment options

@jannikmaierhoefer
Comment options

Comment options

You must be logged in to vote
1 reply
@jannikmaierhoefer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment