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

feat(tracing): add anthropic streaming support #9471

Merged
merged 48 commits into from
Jun 11, 2024

Conversation

wconti27
Copy link
Contributor

@wconti27 wconti27 commented Jun 3, 2024

Adds streaming support for Anthropic Integration and LLMObservability Integration

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@wconti27 wconti27 requested a review from Yun-Kim June 3, 2024 23:50
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Jun 4, 2024

Datadog Report

Branch report: conti/add-anthropic-streaming-support
Commit report: cd3b1f1
Test service: dd-trace-py

✅ 0 Failed, 125 Passed, 85 Skipped, 1m 48.27s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Jun 4, 2024

Benchmarks

Benchmark execution time: 2024-06-11 18:25:11

Comparing candidate commit 717bd6f in PR branch conti/add-anthropic-streaming-support with baseline commit 2e237a7 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 221 metrics, 9 unstable metrics.

@wconti27 wconti27 self-assigned this Jun 6, 2024
@wconti27 wconti27 marked this pull request as ready for review June 6, 2024 15:29
@wconti27 wconti27 requested review from a team as code owners June 6, 2024 15:29
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

minor questions and nits

ddtrace/contrib/anthropic/patch.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/patch.py Outdated Show resolved Hide resolved
tests/contrib/anthropic/conftest.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/patch.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
wconti27 and others added 3 commits June 7, 2024 09:28
…f1bd0.yaml

Co-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
ddtrace/contrib/anthropic/_streaming.py Outdated Show resolved Hide resolved
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

minor suggestion about release note, otherwise lgtm

@wconti27 wconti27 enabled auto-merge (squash) June 11, 2024 18:33
@wconti27 wconti27 merged commit d7a5bd7 into main Jun 11, 2024
77 checks passed
@wconti27 wconti27 deleted the conti/add-anthropic-streaming-support branch June 11, 2024 18:39
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