Skip to content

Commit a73ca09

Browse files
authored
Distro release 1.6.0 (#35935)
* Distro release 1.6.0 * Fix exporter entry point names * Tests
1 parent 6e6648a commit a73ca09

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.6.0 (Unreleased)
3+
## 1.6.0 (2024-06-06)
44

55
### Features Added
66

@@ -9,12 +9,6 @@
99
- Rework autoinstrumentation: Configure exporters and samplers directly
1010
([#35890](https://github.com/Azure/azure-sdk-for-python/pull/35890))
1111

12-
### Breaking Changes
13-
14-
### Bugs Fixed
15-
16-
### Other Changes
17-
1812
## 1.5.0 (2024-05-31)
1913

2014
### Features Added

sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_autoinstrumentation/configurator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ def _configure(self, **kwargs):
4040
warn(_PREVIEW_ENTRY_POINT_WARNING)
4141
try:
4242
if environ.get(OTEL_TRACES_EXPORTER, "").lower().strip() != "none":
43-
kwargs.setdefault(TRACE_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"])
43+
kwargs.setdefault(TRACE_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"])
4444
try:
4545
sample_rate = float(environ.get("OTEL_TRACES_SAMPLER_ARG", 1.0))
4646
except ValueError:
4747
sample_rate = 1.0
4848
kwargs.setdefault(SAMPLER_ARG, ApplicationInsightsSampler(sample_rate))
4949
if environ.get(OTEL_METRICS_EXPORTER, "").lower().strip() != "none":
50-
kwargs.setdefault(METRIC_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"])
50+
kwargs.setdefault(METRIC_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"])
5151
if environ.get(OTEL_LOGS_EXPORTER, "").lower().strip() != "none":
52-
kwargs.setdefault(LOG_EXPORTER_NAMES_ARG, ["azure-monitor-opentelemetry-exporter"])
52+
kwargs.setdefault(LOG_EXPORTER_NAMES_ARG, ["azure_monitor_opentelemetry_exporter"])
5353
# As of OTel SDK 1.25.0, exporters passed as kwargs will be added to those specified in env vars.
5454
super()._configure(**kwargs)
5555
AzureStatusLogger.log_status(True)

sdk/monitor/azure-monitor-opentelemetry/tests/autoinstrumentation/test_configurator.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def test_configure(self, mock_diagnostics, attach_mock, sampler_mock, super_mock
2929
sampler_mock.assert_called_once_with(1.0)
3030
super_mock()._configure.assert_called_once_with(
3131
auto_instrumentation_version="TEST_VERSION",
32-
trace_exporter_names=["azure-monitor-opentelemetry-exporter"],
33-
metric_exporter_names=["azure-monitor-opentelemetry-exporter"],
34-
log_exporter_names=["azure-monitor-opentelemetry-exporter"],
32+
trace_exporter_names=["azure_monitor_opentelemetry_exporter"],
33+
metric_exporter_names=["azure_monitor_opentelemetry_exporter"],
34+
log_exporter_names=["azure_monitor_opentelemetry_exporter"],
3535
sampler="TEST_SAMPLER",
3636
)
3737
mock_diagnostics.info.assert_called_once_with(
@@ -56,9 +56,9 @@ def test_configure_sampler_arg(self, mock_diagnostics, attach_mock, sampler_mock
5656
sampler_mock.assert_called_once_with(0.5)
5757
super_mock()._configure.assert_called_once_with(
5858
auto_instrumentation_version="TEST_VERSION",
59-
trace_exporter_names=["azure-monitor-opentelemetry-exporter"],
60-
metric_exporter_names=["azure-monitor-opentelemetry-exporter"],
61-
log_exporter_names=["azure-monitor-opentelemetry-exporter"],
59+
trace_exporter_names=["azure_monitor_opentelemetry_exporter"],
60+
metric_exporter_names=["azure_monitor_opentelemetry_exporter"],
61+
log_exporter_names=["azure_monitor_opentelemetry_exporter"],
6262
sampler="TEST_SAMPLER",
6363
)
6464
mock_diagnostics.info.assert_called_once_with(
@@ -80,9 +80,9 @@ def test_configure_preview(self, mock_diagnostics, attach_mock, sampler_mock, su
8080
configurator._configure()
8181
sampler_mock.assert_called_once_with(1.0)
8282
super_mock()._configure.assert_called_once_with(
83-
trace_exporter_names=["azure-monitor-opentelemetry-exporter"],
84-
metric_exporter_names=["azure-monitor-opentelemetry-exporter"],
85-
log_exporter_names=["azure-monitor-opentelemetry-exporter"],
83+
trace_exporter_names=["azure_monitor_opentelemetry_exporter"],
84+
metric_exporter_names=["azure_monitor_opentelemetry_exporter"],
85+
log_exporter_names=["azure_monitor_opentelemetry_exporter"],
8686
sampler="TEST_SAMPLER",
8787
)
8888
mock_diagnostics.info.assert_called_once_with(

0 commit comments

Comments
 (0)