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: Added instrumentation for openai embedding creation #1872

Merged
merged 1 commit into from Nov 16, 2023

Conversation

bizob2828
Copy link
Member

Description

Adds instrumentation to create span for embedding creation and the LlmEmbedding event. I omitted opaque: true. I will update the chat complietion in a different PR. There is an ask to still capture the external http call to openai and this will do so. You can now see in the versioned tests that I'm asserting the child http external for embedding create.

Related Issues

Closes #1842

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34dcd70) 96.85% compared to head (ab97e04) 96.87%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1872      +/-   ##
==========================================
+ Coverage   96.85%   96.87%   +0.01%     
==========================================
  Files         208      209       +1     
  Lines       39422    39573     +151     
==========================================
+ Hits        38184    38335     +151     
  Misses       1238     1238              
Flag Coverage Δ
integration-tests-16.x 78.77% <50.00%> (-0.19%) ⬇️
integration-tests-18.x 79.03% <50.00%> (-0.18%) ⬇️
integration-tests-20.x 79.04% <50.00%> (-0.19%) ⬇️
unit-tests-16.x 91.16% <68.38%> (-0.10%) ⬇️
unit-tests-18.x 91.14% <68.38%> (-0.10%) ⬇️
unit-tests-20.x 91.14% <68.38%> (-0.10%) ⬇️
versioned-tests-16.x 73.57% <96.12%> (+0.26%) ⬆️
versioned-tests-18.x 73.57% <96.12%> (+0.26%) ⬆️
versioned-tests-20.x 73.57% <96.12%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bizob2828 bizob2828 merged commit 1c62321 into newrelic:main Nov 16, 2023
24 checks passed
Node.js Engineering Board automation moved this from Needs PR Review to Done: Issues recently completed Nov 16, 2023
@github-actions github-actions bot mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

Instrument embedding creation
2 participants