Skip to content

Add instrument_sqlite3 - #634

Merged
Kludex merged 6 commits into
mainfrom
add-instrument-sqlite3
Dec 2, 2024
Merged

Kludex merged 6 commits into
mainfrom
add-instrument-sqlite3

Conversation

@Kludex

@Kludex Kludex commented Nov 29, 2024

Copy link
Copy Markdown
Member

No description provided.

@hyperlint-ai-deprecated hyperlint-ai-deprecated Bot left a comment

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 29, 2024 •

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Nov 29, 2024 •

Copy link
Copy Markdown

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.

Comment thread docs/integrations/sqlite3.md Resolved
Comment thread docs/integrations/sqlite3.md 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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,
            },
        )

Comment thread tests/otel_integrations/test_sqlite3.py Resolved
Comment thread tests/otel_integrations/test_sqlite3.py Resolved
@Kludex
Kludex requested a review from alexmojaki December 2, 2024 12:01
@Kludex

Kludex commented Dec 2, 2024

Copy link
Copy Markdown
Member Author

Thanks @alexmojaki

@Kludex
Kludex merged commit bab7008 into main Dec 2, 2024
@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