Skip to content

Unable to import opentelemetry packages with mcr.microsoft.com/azure-functions/python:4-python3.13 #1247

@ksstott

Description

@ksstott

I have a [basic reproduction](https://github.com/[ksstott/azure-functions-python-otel](https://github.com/ksstott/azure-functions-python-otel) of an issue I am having whereby I am unable to import from opentelemetry packages (e.g. from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter) when using the mcr.microsoft.com/azure-functions/python:4-python3.13 image.

Running the docker image in the [basic reproduction](https://github.com/[ksstott/azure-functions-python-otel](https://github.com/ksstott/azure-functions-python-otel) will hang before finally starting but with 0 functions loaded however with no obvious error visible.
Removing the from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter line allows the app to run successfully.
Alternatively switching to the mcr.microsoft.com/azure-functions/python:4-python3.12 image (but keeping the import statement) also allows the app to run successfully.

I've deployed this app to a regular flex-consumption app in Azure using func azure functionapp publish and this works successfully which leads me to believe that this is something specific to docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions