LangChain integration metrics

The official Datadog integration for monitoring LangChain. It collects 6 metrics.

Official summary

Optimize LangChain usage: prompt sampling and performance and cost metrics.

Metric types

  • gauge (value at a point in time): 4
  • count (occurrences in the interval): 2

Metrics

Descriptions are the official definitions, unedited.

MetricTypeUnit
langchain.request.durationRequest duration distribution.gaugenanosecond
langchain.request.errorNumber of errors.counterror
langchain.tokens.completionNumber of tokens used in the completion of a response.gaugetoken/request
langchain.tokens.promptNumber of tokens used in the prompt of a request.gaugetoken/request
langchain.tokens.totalTotal number of tokens used in a request and response.gaugetoken/request
langchain.tokens.total_costEstimated cost in USD based on token usage.countdollar

Official documentation

Official documentation for the LangChain integration

Metric names and descriptions are the official Datadog integration definitions (Copyright Datadog, Inc., BSD-3-Clause), reproduced unedited. The full license terms are on the About page.