Skip to content

Conversation

@piotrjez
Copy link
Contributor

@piotrjez piotrjez commented Nov 6, 2025

Description

Suggested documentation updates:

  1. Explicitly mention that Django’s middleware stack executes after the request_hook runs,
    so attributes like request.user or request.site are unavailable there.
  2. Add examples for AuthenticationMiddleware and CurrentSiteMiddleware showing how to capture
    enduser.id, enduser.username, site.id and site.domain in response_hook.
  3. Clarify that this pattern also applies to any custom middleware attaching data to the request object.
  4. Update links for Django docs to latest LTS version 5.2

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  1. Virtualenv in Python 3.11
  2. tox -e docs
  3. Check local build in docs/_build/html/instrumentation/*

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 6, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: xrmx / name: Riccardo Magliocchetti (3ba09be)

Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

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

Thanks for updates, lgtm

@xrmx xrmx enabled auto-merge (squash) November 24, 2025 15:30
@xrmx xrmx merged commit 015163c into open-telemetry:main Nov 24, 2025
647 checks passed
@piotrjez piotrjez deleted the docs-django-response-hooks branch November 25, 2025 06:06
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.

3 participants