getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.93k stars 510 forks source link

Python grpc.aio metadata is transformed to list #2509

Open kindermax opened 1 year ago

kindermax commented 1 year ago

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.35.0

Steps to Reproduce

Hi, in latest sentry-sdk release a new Client interceptor was added for grpc.aio client. The problems is that metadata is transformed into a list and it breaks all subsequent interceptors which expect metadata to be grpc.aio.Metadata object (https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/aio/_interceptor.py#L93C14-L93C14)

Expected Result

Maybe metadata needs to be preserved as type grpc.aio.Metadata

Actual Result

For now i see error that metadata is a list

image
sentrivana commented 1 year ago

Thank you for reporting this @kindermax! We'll take a look.