Skip to content

Startup errors with autoinstrumentation-python 0.50b #3616

Open
@hien-prio

Description

Component(s)

auto-instrumentation

What happened?

Description

We are on Python 3.8.6, running a flask=2.2.5 app using gunicorn=22.0.0.

The app has been starting up fine using ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.48b0, but when it pulled latest=0.50b0 this morning it fails to startup with this partial stack frame.

Did the latest change #3610 introduce a Python 3.9 requirement?

Steps to Reproduce

No steps, just app startup.

Expected Result

App successfully starts and auto-instruments.

Actual Result

Auto-instrumentation fails and kills process.

Kubernetes Version

v1.31.4-eks-2d5f260

Operator version

0.111.0

Collector version

0.111.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

Log output

Configuration of configurator failed
Traceback (most recent call last):
  File "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation/_load.py", line 151, in _load_configurators
    entry_point.load()().configure(
  File "/otel-auto-instrumentation-python/opentelemetry/sdk/_configuration/__init__.py", line 440, in configure
    self._configure(**kwargs)
  File "/otel-auto-instrumentation-python/opentelemetry/sdk/_configuration/__init__.py", line 456, in _configure
    _initialize_components(**kwargs)
  File "/otel-auto-instrumentation-python/opentelemetry/sdk/_configuration/__init__.py", line 375, in _initialize_components
    span_exporters, metric_exporters, log_exporters = _import_exporters(
  File "/otel-auto-instrumentation-python/opentelemetry/sdk/_configuration/__init__.py", line 273, in _import_exporters
    ) in _import_config_components(
  File "/otel-auto-instrumentation-python/opentelemetry/sdk/_configuration/__init__.py", line 103, in _import_config_components
    next(
  File "/otel-auto-instrumentation-python/importlib_metadata/__init__.py", line 189, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/otel-auto-instrumentation-python/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py", line 23, in <module>
    import requests
  File "/otel-auto-instrumentation-python/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/otel-auto-instrumentation-python/urllib3/__init__.py", line 14, in <module>
    from . import exceptions
  File "/otel-auto-instrumentation-python/urllib3/exceptions.py", line 26, in <module>
    _TYPE_REDUCE_RESULT = tuple[typing.Callable[..., object], tuple[object, ...]]
TypeError: 'type' object is not subscriptable
Failed to auto initialize opentelemetry

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions