Skip to content

Fix attach type to reflect backoff correctly#1

Draft
jeremydvoss wants to merge 6 commits into
mainfrom
attach-type
Draft

Fix attach type to reflect backoff correctly#1
jeremydvoss wants to merge 6 commits into
mainfrom
attach-type

Conversation

@jeremydvoss

Copy link
Copy Markdown
Owner

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

jeremydvoss and others added 5 commits May 28, 2026 15:09
Update _is_attach_enabled() to check the new
APPLICATIONINSIGHTS_PYTHON_ATTACHTYPE environment variable set by the
RP integration agent (sitecustomize.py). When the env var is present,
attach is only considered enabled if it is set to IntegratedAuto AND
the existing per-RP logic (Functions, App Service, AKS) is satisfied.
When the env var is absent, the function falls back to legacy detection
(path-based for App Service, env-var-based for Functions/AKS).

This resolves false positives where the agent path exists but
auto-instrumentation backed off or failed to attach.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant