-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(llmobs): submit span events for chains from langchain #8920
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 2852 Passed, 288 Skipped, 1h 18m 42.98s Total duration (6m 11.54s time saved) |
BenchmarksBenchmark execution time: 2024-04-17 19:55:51 Comparing candidate commit 2af0e25 in PR branch Found 3 performance improvements and 0 performance regressions! Performance is the same for 198 metrics, 9 unstable metrics. scenario:flasksimple-appsec-get
scenario:httppropagationextract-all_styles_all_headers
scenario:httppropagationextract-medium_header_no_matches
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! Other than a couple of style points, I had a couple suggestions on how we should tag chain inputs and outputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
Summary
Follow-up to #8695
This PR adds support for submitting LLMObs span events from the LangChain integration automatically if LLMObs is enabled, and if the LLMObs span is sampled. This is accomplished by:
SpanTypes.LLM
onlangchain
chain APM spans so they are properly processed by the trace processor service in the LLMObs serviceFor Reviewers
Most of the LOC are test changes to account for the change in test structure when dealing with variable amounts of expected calls to the LLMObs writer. Additionally, many of the files changed are snapshot files, to account for the change in the span type. Otherwise, the important files changed are:
ddtrace/contrib/langchain/patch.py
ddtrace/llmobs/_integrations/langchain.py
Additionally, no release notes/changelog, as this is an internal change for submitting span events to LLMObs intake.
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist