LangChain

  • How-to guide
  • 2-min read
  • Published Oct 22, 2024

LangChain is a framework designed for building applications that utilize large language models (LLMs). It provides a set of tools and components that make it easier to integrate LLMs into various applications, enabling developers to create complex workflows and functionalities.

With Dynatrace, you can get visibility into each step of the workflows monitoring prompt and completion messages, error tracking, performance metrics, and more.

trace-agentic-pipeline

Spans

The following attributes are available for GenAI Spans.

AttributeTypeDescription
gen_ai.completion.0.contentstringThe full response received from the GenAI model.
gen_ai.completion.0.rolestringThe role used by the GenAI model.
gen_ai.prompt.0.contentstringThe full prompt sent to the GenAI model.
gen_ai.prompt.0.rolestringThe role setting for the GenAI request.
gen_ai.request.modelstringThe name of the GenAI model a request is being made to.
gen_ai.response.modelstringThe name of the model that generated the response.
gen_ai.systemstringThe GenAI product as identified by the client or server instrumentation.
llm.request.typestringThe type of the operation being performed.
traceloop.entity.namestringThe name of the action in the chain.
traceloop.span.kindstringThe type of action in the chain.
traceloop.workflow.namestringThe name of the chain.

Metrics

MetricTypeUnitDescription
http.client.durationhistogrammsThe duration of the outbound HTTP request.