-
Notifications
You must be signed in to change notification settings - Fork 838
Description
Which component is this feature for?
Langchain Instrumentation
🔖 Feature description
Emit error/exception metrics in Langchain instrumentation - similar to OpenAI, Anthropic, Bedrock.
🎤 Why is this feature needed ?
Langchain instrumentation does not seem to be emitting error / exception metrics as part of it's _handle_error method.
Is there a plan to implement this? If yes, would the recommendation be to emit separate metrics for each component type - tool, agent, task, workflow, retriever, etc? It would be nice to have a standardized way for emitting these kinds of metrics.
✌️ How do you aim to achieve this?
Metrics are being emitted for instrumentations like Anthropic, OpenAI and Bedrock. However, Langchain needs a more elaborate implementation here since errors could occur in various components like - tool call, agent, task, workflow, etc. It would be nice to differentiate the emitted metrics based on these components. A simple Counter like Meters.LLM_ANTHROPIC_COMPLETION_EXCEPTIONS might not suffice.
🔄️ Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
Yes I am willing to submit a PR!