You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10),
interceptors=(PromServerInterceptor(),))
/site-packages/opentelemetry/instrumentation/grpc/__init__.py", line 338, in server
kwargs["interceptors"].insert(
AttributeError: 'tuple' object has no attribute 'insert'
Expected Result
Even though the user sends an interceptor as tuple, grpc instrument should work as expected.
Actual Result
throw error because tuple does not have insert attribute.
Additional context
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered:
Describe your environment
OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.8.10)
Package version: (e.g., 0.46.0)
What happened?
The following method expects an interceptor of the list type, but some libraries pass interceptors as tuples. (Example: https://pypi.org/project/py-grpc-prometheus/)
I think it would be better to check type of change type as list.
Steps to Reproduce
You can download https://pypi.org/project/py-grpc-prometheus/.
And setup like the following.
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10),
interceptors=(PromServerInterceptor(),))
Expected Result
Even though the user sends an interceptor as tuple, grpc instrument should work as expected.
Actual Result
throw error because tuple does not have insert attribute.
Additional context
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: