Skip to content
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

[MLOB-1009] Auto-Instrument LLM Observability #500

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

sabrenner
Copy link
Collaborator

What does this PR do?

Adds auto-instrumentation to the serverless layer for LLM Observability. Now, in order to enable LLM Observability for auto-instrumented integrations (OpenAI, LangChain, Bedrock, and Anthropic), set DD_LLMOBS_ENABLED=1, along with:

DD_LLMOBS_ML_APP=<YOUR_ML_APP>
DD_API_KEY=<YOUR_DATADOG_API_KEY>
DD_SITE=<YOUR_DATADOG_SITE>

LLM Observability documentation is available for full instrumentation instructions.

Motivation

Enable easy onboarding and auto-instrumentation experience with LLM Observability in a serverless environment.

Testing Guidelines

Built the layer and tested against a lambda handler. Verified that

  1. LLM traces were submitted per invocation of the function
  2. APM traces were still being sent as well

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@sabrenner sabrenner changed the title [MLOB-1099] Auto-Instrument LLM Observability [MLOB-1009] Auto-Instrument LLM Observability Jul 1, 2024
@sabrenner sabrenner marked this pull request as ready for review July 1, 2024 15:29
@sabrenner sabrenner requested a review from a team as a code owner July 1, 2024 15:29
Copy link
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move location of flush call

Copy link
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@sabrenner sabrenner merged commit 4dd3f62 into main Jul 1, 2024
51 checks passed
@sabrenner sabrenner deleted the sabrenner/llmobs-force-flush branch July 1, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants