Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

opencensus-ext-azure doesn't support protobuf > 3.20 #1171

Description

@urucoder

Describe your environment.

Python: 3.9.x
Packages:
opencensus==0.11.0
opencensus-context==0.1.3
opencensus-ext-azure==1.1.7
protobuf==4.21.9

Steps to reproduce.
Create an environment with the packages defined above and try the following import
from opencensus.ext.azure.trace_exporter import AzureExporter

What is the expected behavior?
AzureExporter is imported successfully

What is the actual behavior?
It crashes with the following error

Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions