Skip to content

Commit f022c94

Browse files
authored
feat: httpx instrumentation (#16)
1 parent 8d2901b commit f022c94

5 files changed

Lines changed: 1013 additions & 2 deletions

File tree

drift/core/drift_sdk.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@ def _init_auto_instrumentations(self) -> None:
392392
except ImportError:
393393
pass
394394

395+
try:
396+
import httpx # type: ignore[unresolved-import]
397+
398+
from ..instrumentation.httpx import HttpxInstrumentation
399+
400+
_ = HttpxInstrumentation()
401+
logger.debug("httpx instrumentation initialized")
402+
except ImportError:
403+
pass
404+
395405
# Initialize PostgreSQL instrumentation before Django
396406
# Instrument BOTH psycopg2 and psycopg if available
397407
# This allows apps to use either or both
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""httpx HTTP client instrumentation."""
2+
3+
from .instrumentation import HttpxInstrumentation
4+
5+
__all__ = ["HttpxInstrumentation"]

0 commit comments

Comments
 (0)