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

Add 6 instrument methods #207

Merged
merged 5 commits into from
Jun 3, 2024
Merged

Add 6 instrument methods #207

merged 5 commits into from
Jun 3, 2024

Conversation

alexmojaki
Copy link
Contributor

Part of #193

Copy link

cloudflare-workers-and-pages bot commented May 22, 2024

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9e3f68
Status: ✅  Deploy successful!
Preview URL: https://96cdba73.logfire-docs.pages.dev
Branch Preview URL: https://alex-instrument-6.logfire-docs.pages.dev

View logs

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@alexmojaki
Copy link
Contributor Author

Need to remember to add self._warn_if_not_initialized_for_instrumentation() to these methods after merging #219

@alexmojaki alexmojaki marked this pull request as ready for review May 30, 2024 12:07
from starlette.applications import Starlette


def instrument_starlette(app: Starlette, **kwargs: Any):
Copy link
Member

Choose a reason for hiding this comment

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

As a user, I would have to go to the OTel documentation to see which ones are the kwargs. I think we should correctly type hint instead of using the kwargs.

If the argument for doing it like this is because they may break our API, we can just do the if TYPE_CHECKING trick. It just provides a far better experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we should do that eventually.

@alexmojaki alexmojaki enabled auto-merge (squash) June 3, 2024 10:27
@alexmojaki alexmojaki merged commit f600862 into main Jun 3, 2024
11 checks passed
@alexmojaki alexmojaki deleted the alex/instrument-6 branch June 3, 2024 10:29
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.

2 participants