diff --git a/sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md b/sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md index 0939ae37990f..265957fe6cbe 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.6.0 (Unreleased) +## 1.6.0 (2024-06-06) ### Features Added @@ -9,12 +9,6 @@ - Rework autoinstrumentation: Configure exporters and samplers directly ([#35890](https://github.com/Azure/azure-sdk-for-python/pull/35890)) -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.5.0 (2024-05-31) ### Features Added diff --git a/sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_autoinstrumentation/configurator.py b/sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_autoinstrumentation/configurator.py index cbbd23f58c57..a7ce562d9169 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_autoinstrumentation/configurator.py +++ b/sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_autoinstrumentation/configurator.py @@ -40,16 +40,16 @@ def _configure(self, **kwargs): warn(_PREVIEW_ENTRY_POINT_WARNING) try: if environ.get(OTEL_TRACES_EXPORTER, "").lower().strip() != "none": - kwargs.setdefault(TRACE_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"]) + kwargs.setdefault(TRACE_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"]) try: sample_rate = float(environ.get("OTEL_TRACES_SAMPLER_ARG", 1.0)) except ValueError: sample_rate = 1.0 kwargs.setdefault(SAMPLER_ARG, ApplicationInsightsSampler(sample_rate)) if environ.get(OTEL_METRICS_EXPORTER, "").lower().strip() != "none": - kwargs.setdefault(METRIC_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"]) + kwargs.setdefault(METRIC_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"]) if environ.get(OTEL_LOGS_EXPORTER, "").lower().strip() != "none": - kwargs.setdefault(LOG_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"]) + kwargs.setdefault(LOG_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"]) # As of OTel SDK 1.25.0, exporters passed as kwargs will be added to those specified in env vars. super()._configure(**kwargs) AzureStatusLogger.log_status(True) diff --git a/sdk/monitor/azure-monitor-opentelemetry/tests/autoinstrumentation/test_configurator.py b/sdk/monitor/azure-monitor-opentelemetry/tests/autoinstrumentation/test_configurator.py index 2eb027fc62d0..d492e290e986 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/tests/autoinstrumentation/test_configurator.py +++ b/sdk/monitor/azure-monitor-opentelemetry/tests/autoinstrumentation/test_configurator.py @@ -29,9 +29,9 @@ def test_configure(self, mock_diagnostics, attach_mock, sampler_mock, super_mock sampler_mock.assert_called_once_with(1.0) super_mock()._configure.assert_called_once_with( auto_instrumentation_version="TEST_VERSION", - trace_exporter_names=["azure-monitor-opentelemetry-exporter"], - metric_exporter_names=["azure-monitor-opentelemetry-exporter"], - log_exporter_names=["azure-monitor-opentelemetry-exporter"], + trace_exporter_names=["azure_monitor_opentelemetry_exporter"], + metric_exporter_names=["azure_monitor_opentelemetry_exporter"], + log_exporter_names=["azure_monitor_opentelemetry_exporter"], sampler="TEST_SAMPLER", ) mock_diagnostics.info.assert_called_once_with( @@ -56,9 +56,9 @@ def test_configure_sampler_arg(self, mock_diagnostics, attach_mock, sampler_mock sampler_mock.assert_called_once_with(0.5) super_mock()._configure.assert_called_once_with( auto_instrumentation_version="TEST_VERSION", - trace_exporter_names=["azure-monitor-opentelemetry-exporter"], - metric_exporter_names=["azure-monitor-opentelemetry-exporter"], - log_exporter_names=["azure-monitor-opentelemetry-exporter"], + trace_exporter_names=["azure_monitor_opentelemetry_exporter"], + metric_exporter_names=["azure_monitor_opentelemetry_exporter"], + log_exporter_names=["azure_monitor_opentelemetry_exporter"], sampler="TEST_SAMPLER", ) mock_diagnostics.info.assert_called_once_with( @@ -80,9 +80,9 @@ def test_configure_preview(self, mock_diagnostics, attach_mock, sampler_mock, su configurator._configure() sampler_mock.assert_called_once_with(1.0) super_mock()._configure.assert_called_once_with( - trace_exporter_names=["azure-monitor-opentelemetry-exporter"], - metric_exporter_names=["azure-monitor-opentelemetry-exporter"], - log_exporter_names=["azure-monitor-opentelemetry-exporter"], + trace_exporter_names=["azure_monitor_opentelemetry_exporter"], + metric_exporter_names=["azure_monitor_opentelemetry_exporter"], + log_exporter_names=["azure_monitor_opentelemetry_exporter"], sampler="TEST_SAMPLER", ) mock_diagnostics.info.assert_called_once_with(