Skip to content

Commit

Permalink
Ignore backoff warning if in functions environment (Azure#38787)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Dec 6, 2024
1 parent 002eea0 commit c5b78cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
([#38543](https://github.com/Azure/azure-sdk-for-python/pull/38543))
- Configure live metrics first in pipeline to detect statsbeat usage
([#37694](https://github.com/Azure/azure-sdk-for-python/pull/37694))
- Ignore backoff warning from distro if in functions environment
([#38787](https://github.com/Azure/azure-sdk-for-python/pull/38787))

### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
)
from azure.monitor.opentelemetry.exporter._utils import ( # pylint: disable=import-error,no-name-in-module
_is_attach_enabled,
_is_on_functions,
)
from azure.monitor.opentelemetry._diagnostics.diagnostic_logging import (
_DISTRO_DETECTS_ATTACH,
Expand Down Expand Up @@ -252,7 +253,7 @@ def _setup_instrumentations(configurations: Dict[str, ConfigurationValue]):


def _send_attach_warning():
if _is_attach_enabled():
if _is_attach_enabled() and not _is_on_functions():
AzureDiagnosticLogging.warning(
"Distro detected that automatic attach may have occurred. Check your data to ensure "
"that telemetry is not being duplicated. This may impact your cost.",
Expand Down

0 comments on commit c5b78cb

Please sign in to comment.