Pass Django and Psycopg instrumentors explicitly to setup_opentelemetry#350
Pass Django and Psycopg instrumentors explicitly to setup_opentelemetry#350NumericalAdvantage wants to merge 2 commits into
Conversation
setup_opentelemetry() in adit-radis-shared 0.24.0 no longer instruments Django and Psycopg unconditionally; instead the caller passes the instrumentor classes. ADIT and RADIS both pass the same list to keep their telemetry behaviour identical to today. - manage.py and adit/asgi.py: import DjangoInstrumentor and PsycopgInstrumentor and pass them as instrumentors=[...]. - pyproject.toml: request the [django] extra of adit-radis-shared so the instrumentor packages are installed alongside the core SDK. Bump the pin to 0.24.0 (release-to-be cut from the openobserve branch line after the corresponding shared-repo PR merges). Re-generate uv.lock with `uv lock --upgrade-package adit-radis-shared` once the 0.24.0 tag exists on origin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the OpenTelemetry configuration to include Django and Psycopg instrumentation. It modifies adit/asgi.py and manage.py to import and register DjangoInstrumentor and PsycopgInstrumentor during telemetry setup. Additionally, the adit-radis-shared dependency in pyproject.toml is updated to version 0.24.0 using the [django] extra. I have no feedback to provide.
Now that openradx/adit-radis-shared#195 has merged and the 0.24.0 tag is cut, re-resolve the lock against the tag the pyproject pin already references. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Adopts the new pluggable-instrumentor API from adit-radis-shared so the helper no longer hard-codes Django/Psycopg.
manage.pyandadit/asgi.pyimport DjangoInstrumentor and PsycopgInstrumentor and pass them asinstrumentors=[...].pyproject.tomlrequests the[django]extra of adit-radis-shared (which carries the two instrumentor packages) and bumps the pin to 0.24.0.Behaviour at runtime is identical to today.
Depends on
Test plan
uv lock --upgrade-package adit-radis-sharedand commit the lock update on this branch.service.name=adit-*still emitting traces/metrics/logs as before.🤖 Generated with Claude Code