-
Hello Guys, i am using the default Langchain tool
And i am sending Base64 as Metadata in my retriever. But this consumes a lot of memory in the traces. Is there a way to disable the tracing for some components of a langchain chain /graph? THX! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Yes, you can disable tracing for specific components of a Langchain chain/graph using the from phoenix.trace import suppress_tracing
with suppress_tracing():
# Code running inside this block doesn't generate traces.
# For example, running LLM evals here won't generate additional traces.
...
# Tracing will resume outside the block.
... Additionally, to disable tracing permanently for the LangChain instrumentor, you can call the LangChainInstrumentor().uninstrument() This will stop tracing indefinitely for the LangChain components [1][2]. |
Beta Was this translation helpful? Give feedback.
-
@DRXD1000 were you able to get it resolved? Curious why there is a large payload in your metadata. Are you leveraging LangChain metadata to pass data between components? If you roughly know the size of the payload, you can suppress all attributes that are larger than a certain size using openTelemetry environment variables. https://opentelemetry.io/docs/specs/otel/common/#configurable-parameters |
Beta Was this translation helpful? Give feedback.
Yes, you can disable tracing for specific components of a Langchain chain/graph using the
suppress_tracing
context manager. Here is an example:Additionally, to disable tracing permanently for the LangChain instrumentor, you can call the
.uninstrument()
method:This will stop tracing indefinitely for the LangChain components [1][2].
To continue talking to Dosu, mention @dosu.