Skip to content

Conversation

@GSVarsha
Copy link
Contributor

@GSVarsha GSVarsha commented Nov 5, 2024

What's new?

  • Add support to ASGI requests.

  • Migrate the Django middleware to conform with the new style, from Django 2.0 onwards. By having a single entrypoint to the middleware, __call__, which is wrapped with sync_to_async just once for async requests, we avoid the issue where a ContextVar cannot be reset from a different context.

P.S.

ASGI support new in 3.0
response.headers new in 3.2 (needed to extract custom headers)

@GSVarsha GSVarsha requested a review from a team as a code owner November 5, 2024 10:32
@GSVarsha GSVarsha self-assigned this Nov 5, 2024
@GSVarsha GSVarsha added this to the H2-2024 milestone Nov 5, 2024
@GSVarsha GSVarsha added bug enhancement Review & Merge OTel_migration Migration the code dependency from OpenTracing to OpenTelemetry labels Nov 5, 2024
Copy link
Contributor

@CagriYonca CagriYonca left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@GSVarsha GSVarsha force-pushed the django-asgi-support-otel branch from ced0341 to 1ea5eb7 Compare November 5, 2024 11:03
Copy link
Member

@pvital pvital left a comment

Choose a reason for hiding this comment

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

Few comments.

- Migrate Django middleware to new-style

Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
@GSVarsha GSVarsha force-pushed the django-asgi-support-otel branch from 1ea5eb7 to ad1861c Compare November 11, 2024 06:28
@GSVarsha GSVarsha requested a review from pvital November 11, 2024 06:28
Copy link
Member

@pvital pvital left a comment

Choose a reason for hiding this comment

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

It looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement OTel_migration Migration the code dependency from OpenTracing to OpenTelemetry Review & Merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants