Skip to content

Pass Django and Psycopg instrumentors explicitly to setup_opentelemetry#350

Open
NumericalAdvantage wants to merge 2 commits into
mainfrom
telemetry-pluggable-instrumentors
Open

Pass Django and Psycopg instrumentors explicitly to setup_opentelemetry#350
NumericalAdvantage wants to merge 2 commits into
mainfrom
telemetry-pluggable-instrumentors

Conversation

@NumericalAdvantage
Copy link
Copy Markdown
Collaborator

Summary

Adopts the new pluggable-instrumentor API from adit-radis-shared so the helper no longer hard-codes Django/Psycopg.

  • manage.py and adit/asgi.py import DjangoInstrumentor and PsycopgInstrumentor and pass them as instrumentors=[...].
  • pyproject.toml requests 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

  • After adit-radis-shared#195 merges and the 0.24.0 tag is pushed: run uv lock --upgrade-package adit-radis-shared and commit the lock update on this branch.
  • CI should pass (Django boots, web requests still produce traces, Psycopg still produces DB spans).
  • Eyeball OpenObserve after deploy: service.name=adit-* still emitting traces/metrics/logs as before.

🤖 Generated with Claude Code

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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@NumericalAdvantage has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 56 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a1347c85-4c87-4005-8ac6-587995cfb4b6

📥 Commits

Reviewing files that changed from the base of the PR and between cb521ce and 6a67f1c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • adit/asgi.py
  • manage.py
  • pyproject.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch telemetry-pluggable-instrumentors

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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>
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.

1 participant