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: Add boto3 instrumentation #115

Merged
merged 31 commits into from
Jan 24, 2024
Merged

Conversation

anticorrelator
Copy link
Contributor

@anticorrelator anticorrelator commented Jan 17, 2024

Resolves #33

Adds instrumentation for model calls via boto3 Bedrock client

Copy link
Contributor

github-actions bot commented Jan 17, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@anticorrelator
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 17, 2024
@anticorrelator anticorrelator marked this pull request as ready for review January 21, 2024 21:12
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 21, 2024
Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

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

Feels unexpected to place the implementation inside init.py. Any reason not to place it inside a client file?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 23, 2024
build-backend = "hatchling.build"

[project]
name = "openinference-instrumentation-boto"
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be called bedrock instead of boto?

Suggested change
name = "openinference-instrumentation-boto"
name = "openinference-instrumentation-bedrock"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question, we are instrumenting bedrock specifically but only for calls using the boto client. I'm leaning towards thinking bedrock is better too, let me think about this a little bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think let's leave the module as boto, since AWS may release more LLM functionality in the future that isn't specifically part of the Bedrock service. I think we should change the instrumentor name to BedrockInstrumentor though

@anticorrelator
Copy link
Contributor Author

Feels unexpected to place the implementation inside init.py. Any reason not to place it inside a client file?

I think it's often seen if the implementation is small. I'll break it up as the complexity grows

@anticorrelator anticorrelator merged commit 01aad1f into main Jan 24, 2024
3 checks passed
@anticorrelator anticorrelator deleted the dustin/boto-instrumentation branch January 24, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

☔ [Python] AWS bedrock Instrumentation
4 participants