diff --git a/src/microsoft/opentelemetry/_constants.py b/src/microsoft/opentelemetry/_constants.py index 44f87be4..99c71fd9 100644 --- a/src/microsoft/opentelemetry/_constants.py +++ b/src/microsoft/opentelemetry/_constants.py @@ -125,4 +125,4 @@ GEN_AI_MAIN_AGENT_ATTRIBUTE_PREFIX = "microsoft.gen_ai.main_agent." # --- Version propagation for distro to exporter --- -MICROSOFT_OPENTELEMETRY_VERSION_ENV = "microsoft_opentelemetry_version" +MICROSOFT_OPENTELEMETRY_VERSION_ENV = "MICROSOFT_OPENTELEMETRY_VERSION" diff --git a/src/microsoft/opentelemetry/_distro.py b/src/microsoft/opentelemetry/_distro.py index 9bb2ac8d..36ba59b9 100644 --- a/src/microsoft/opentelemetry/_distro.py +++ b/src/microsoft/opentelemetry/_distro.py @@ -84,6 +84,9 @@ ) from microsoft.opentelemetry._version import VERSION +os.environ.setdefault(MICROSOFT_OPENTELEMETRY_VERSION_ENV, VERSION) + +# pylint: disable=wrong-import-position import azure.monitor.opentelemetry.exporter._utils as _exporter_utils from azure.monitor.opentelemetry.exporter.statsbeat._statsbeat_metrics import ( _StatsbeatMetrics,