Skip to content

Commit c5b78cb

Browse files
authored
Ignore backoff warning if in functions environment (#38787)
1 parent 002eea0 commit c5b78cb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
([#38543](https://github.com/Azure/azure-sdk-for-python/pull/38543))
1111
- Configure live metrics first in pipeline to detect statsbeat usage
1212
([#37694](https://github.com/Azure/azure-sdk-for-python/pull/37694))
13+
- Ignore backoff warning from distro if in functions environment
14+
([#38787](https://github.com/Azure/azure-sdk-for-python/pull/38787))
1315

1416
### Breaking Changes
1517

sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
)
6464
from azure.monitor.opentelemetry.exporter._utils import ( # pylint: disable=import-error,no-name-in-module
6565
_is_attach_enabled,
66+
_is_on_functions,
6667
)
6768
from azure.monitor.opentelemetry._diagnostics.diagnostic_logging import (
6869
_DISTRO_DETECTS_ATTACH,
@@ -252,7 +253,7 @@ def _setup_instrumentations(configurations: Dict[str, ConfigurationValue]):
252253

253254

254255
def _send_attach_warning():
255-
if _is_attach_enabled():
256+
if _is_attach_enabled() and not _is_on_functions():
256257
AzureDiagnosticLogging.warning(
257258
"Distro detected that automatic attach may have occurred. Check your data to ensure "
258259
"that telemetry is not being duplicated. This may impact your cost.",

0 commit comments

Comments
 (0)