Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

## 1.0.1 (Unreleased)

- Add message ids for AppLens
([#32195](https://github.com/Azure/azure-sdk-for-python/pull/32195))

### Features Added

- Add ability to specify which logger to export telemetry for via `logger_name` configuration
([#32192](https://github.com/Azure/azure-sdk-for-python/pull/32192))
- Add message ids for AppLens
([#32195](https://github.com/Azure/azure-sdk-for-python/pull/32195))
- Remove pkg_resources
([#32299](https://github.com/Azure/azure-sdk-for-python/pull/32299))

### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from logging import getLogger
from typing import Dict, cast

from importlib_metadata import entry_points
from opentelemetry._logs import get_logger_provider, set_logger_provider
from opentelemetry.instrumentation.dependencies import (
get_dist_dependency_conflicts,
Expand All @@ -24,7 +25,6 @@
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.trace import get_tracer_provider, set_tracer_provider
from pkg_resources import iter_entry_points # type: ignore

from azure.core.settings import settings
from azure.core.tracing.ext.opentelemetry_span import OpenTelemetrySpan
Expand Down Expand Up @@ -147,9 +147,8 @@ def _setup_metrics(configurations: Dict[str, ConfigurationValue]):


def _setup_instrumentations(configurations: Dict[str, ConfigurationValue]):
# use pkg_resources for now until https://github.com/open-telemetry/opentelemetry-python/pull/3168 is merged
for entry_point in iter_entry_points(
"opentelemetry_instrumentor"
for entry_point in entry_points(
group="opentelemetry_instrumentor"
):
lib_name = entry_point.name
if lib_name not in _ALL_SUPPORTED_INSTRUMENTED_LIBRARIES:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def test_setup_metrics(
@patch("azure.monitor.opentelemetry._configure._ALL_SUPPORTED_INSTRUMENTED_LIBRARIES", ("test_instr2"))
@patch("azure.monitor.opentelemetry._configure._is_instrumentation_enabled")
@patch("azure.monitor.opentelemetry._configure.get_dist_dependency_conflicts")
@patch("azure.monitor.opentelemetry._configure.iter_entry_points")
@patch("azure.monitor.opentelemetry._configure.entry_points")
def test_setup_instrumentations_lib_not_supported(
self,
iter_mock,
Expand Down Expand Up @@ -410,7 +410,7 @@ def test_setup_instrumentations_lib_not_supported(
@patch("azure.monitor.opentelemetry._configure._is_instrumentation_enabled")
@patch("azure.monitor.opentelemetry._configure._logger")
@patch("azure.monitor.opentelemetry._configure.get_dist_dependency_conflicts")
@patch("azure.monitor.opentelemetry._configure.iter_entry_points")
@patch("azure.monitor.opentelemetry._configure.entry_points")
def test_setup_instrumentations_conflict(
self,
iter_mock,
Expand All @@ -437,7 +437,7 @@ def test_setup_instrumentations_conflict(
@patch("azure.monitor.opentelemetry._configure._is_instrumentation_enabled")
@patch("azure.monitor.opentelemetry._configure._logger")
@patch("azure.monitor.opentelemetry._configure.get_dist_dependency_conflicts")
@patch("azure.monitor.opentelemetry._configure.iter_entry_points")
@patch("azure.monitor.opentelemetry._configure.entry_points")
def test_setup_instrumentations_exception(
self,
iter_mock,
Expand All @@ -464,7 +464,7 @@ def test_setup_instrumentations_exception(
@patch("azure.monitor.opentelemetry._configure._is_instrumentation_enabled")
@patch("azure.monitor.opentelemetry._configure._logger")
@patch("azure.monitor.opentelemetry._configure.get_dist_dependency_conflicts")
@patch("azure.monitor.opentelemetry._configure.iter_entry_points")
@patch("azure.monitor.opentelemetry._configure.entry_points")
def test_setup_instrumentations_disabled(
self,
iter_mock,
Expand Down