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 instrument_sqlite3 #634

Merged
merged 6 commits into from
Dec 2, 2024
Merged

Add instrument_sqlite3 #634

merged 6 commits into from
Dec 2, 2024

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Nov 29, 2024

No description provided.

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:

  • SQLite

Copy link

cloudflare-workers-and-pages bot commented Nov 29, 2024

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0cd258
Status: ✅  Deploy successful!
Preview URL: https://fad89663.logfire-docs.pages.dev
Branch Preview URL: https://add-instrument-sqlite3.logfire-docs.pages.dev

View logs

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (43847a5) to head (e0cd258).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #634   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          133       135    +2     
  Lines        10620     10682   +62     
  Branches      1461      1467    +6     
=========================================
+ Hits         10620     10682   +62     

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

docs/integrations/sqlite3.md Outdated Show resolved Hide resolved
docs/integrations/sqlite3.md Outdated Show resolved Hide resolved
if conn is not None:
return SQLite3Instrumentor().instrument_connection(conn, tracer_provider=tracer_provider) # type: ignore[reportUnknownMemberType]
else:
return SQLite3Instrumentor().instrument(tracer_provider=tracer_provider, **kwargs) # type: ignore[reportUnknownMemberType]
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but the other integrations intentionally make it possible to override tracer_provider in kwargs

Copy link
Member Author

Choose a reason for hiding this comment

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

I've copied this implementation from mysql. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

but it's different in main.py:

        return instrument_mysql(
            conn=conn,
            **{  # type: ignore
                'tracer_provider': self._config.get_tracer_provider(),
                'meter_provider': self._config.get_meter_provider(),
                **kwargs,
            },
        )

tests/otel_integrations/test_sqlite3.py Outdated Show resolved Hide resolved
tests/otel_integrations/test_sqlite3.py Show resolved Hide resolved
@Kludex Kludex requested a review from alexmojaki December 2, 2024 12:01
@Kludex
Copy link
Member Author

Kludex commented Dec 2, 2024

Thanks @alexmojaki

@Kludex Kludex merged commit bab7008 into main Dec 2, 2024
17 checks passed
@Kludex Kludex deleted the add-instrument-sqlite3 branch December 2, 2024 12: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