Skip to content

Commit f4d09f9

Browse files
authored
Remove special support for celery from sitecustomize (open-telemetry#799)
This is not required anymore after merging open-telemetry/opentelemetry-python#2242
1 parent 760673f commit f4d09f9

File tree

1 file changed

+2
-16
lines changed
  • opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation

1 file changed

+2
-16
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py

+2-16
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import sys
1615
from logging import getLogger
17-
from os import environ, path
16+
from os import environ
1817
from os.path import abspath, dirname, pathsep
1918
from re import sub
2019

@@ -125,17 +124,4 @@ def initialize():
125124
)
126125

127126

128-
if (
129-
hasattr(sys, "argv")
130-
and sys.argv[0].split(path.sep)[-1] == "celery"
131-
and "worker" in sys.argv[1:]
132-
):
133-
from celery.signals import worker_process_init # pylint:disable=E0401
134-
135-
@worker_process_init.connect(weak=False)
136-
def init_celery(*args, **kwargs):
137-
initialize()
138-
139-
140-
else:
141-
initialize()
127+
initialize()

0 commit comments

Comments
 (0)