open-telemetry / open-telemetry/opentelemetry-python-contrib

Unable to create a GrpcInstrumentorServer or client with a filter

Open
#1,740 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Describe your environment
Python v3.7
opentelemetry.instrumentation.grpc v0.36b0

Steps to reproduce
In a python repl:

>>> from opentelemetry.instrumentation.grpc import GrpcInstrumentorServer
>>> GrpcInstrumentorServer(filter_=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/imcnally/.virtualenvs/oscar/lib/python3.7/site-packages/opentelemetry/instrumentation/instrumentor.py", line 50, in __new__
    cls._instance = object.__new__(cls, *args, **kwargs)
TypeError: object.__new__() takes exactly one argument (the type to instantiate)

What is the expected behavior?
A new instance of the class

What is the actual behavior?
An error is thrown

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The traceback points to instrumentor.py, where GrpcInstrumentorServer(filter_=None) enters new; reproduce the failure for both server and client constructors. Confirm the fix by exercising those constructors and checking that each creates an instance without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.