什么是自动检测或无代码附加 - Azure Monitor Application Insights?What is auto-instrumentation or codeless attach - Azure Monitor Application Insights?

自动检测或无代码附加允许使用 Application Insights 来启用应用程序监视,无需更改代码。Auto-instrumentation, or codeless attach, allows you to enable application monitoring with Application Insights without changing your code.

Application Insights 与各种资源提供程序集成,可在不同的环境中工作。Application Insights is integrated with various resource providers and works on different environments. 事实上,你只需启用代理并在某些情况下对其进行配置,该代理便可自动收集遥测数据。In essence, all you have to do is enable and - in some cases - configure the agent, which will collect the telemetry automatically box. 你会立刻在 Application Insights 资源中看到指标、数据和依赖项,因此可以在潜在问题出现之前发现其来源,并通过端到端事务视图分析根本原因。In no time, you'll see the metrics, data, and dependencies in your Application Insights resource, which will allow you to spot the source of potential problems before they occur, and analyze the root cause with end-to-end transaction view.

支持的环境、语言和资源提供程序Supported environments, languages, and resource providers

随着我们添加更多集成,自动检测功能矩阵会变得很复杂。As we're adding additional integrations, the auto-instrumentation capability matrix becomes complex. 下表显示了与各种资源提供程序、语言和环境的支持相对应的项目的当前状态。The table below shows you the current state of the matter as far as support for various resource providers, languages, and environments go.

环境/资源提供程序Environment/Resource Provider .NET.NET .NET Core.NET Core JavaJava Node.jsNode.js PythonPython
Windows 上的 Azure 应用服务Azure App Service on Windows GA,OnBD*GA, OnBD* GA,选择加入GA, opt-in 正在进行In progress 正在进行In progress 不支持Not supported
Linux 上的 Azure 应用服务Azure App Service on Linux 空值N/A 不支持Not supported 正在学习In progress 公共预览版Public Preview 不支持Not supported
AKS 上的 Azure 应用服务Azure App Service on AKS 空值N/A 设计中In design 设计中In design 设计中In design 不支持Not supported
Azure Functions - 基本Azure Functions - basic GA,OnBD*GA, OnBD* GA,OnBD*GA, OnBD* GA,OnBD*GA, OnBD* GA,OnBD*GA, OnBD* GA,OnBD*GA, OnBD*
Azure Functions Windows - 依赖项Azure Functions Windows - dependencies 不支持Not supported 不支持Not supported 公共预览版Public Preview 不支持Not supported 不支持Not supported
Azure Kubernetes 服务Azure Kubernetes Service 空值N/A 设计中In design 通过代理Through agent 设计中In design 不支持Not supported
Azure VM (Windows)Azure VMs Windows 公共预览版Public Preview 不支持Not supported 不支持Not supported 不支持Not supported 不支持Not supported
本地 VM (Windows)On-Premises VMs Windows GA,选择加入GA, opt-in 不支持Not supported 通过代理Through agent 不支持Not supported 不支持Not supported
独立代理 - 任何环境Standalone agent - any env. 不支持Not supported 不支持Not supported GAGA 不支持Not supported 不支持Not supported

*OnBD 是 On by Default(默认启用)的缩写 - 当你在受支持的环境中部署应用后,系统会自动启用 Application Insights。*OnBD is short for On by Default - the Application Insights will be enabled automatically once you deploy your app in supported environments.

Azure 应用服务Azure App Service

WindowsWindows

.NET.NET

Windows 上 Azure 应用服务的应用程序监视可用于 .NET 应用程序 .NET,并且默认启用。Application monitoring on Azure App Service on Windows is available for .NET applications .NET and is enabled by default.

.NETCore.NETCore

只需单击一次便可启用对 .NETCore 应用程序的监视。Monitoring for .NETCore applications can be enabled with one click.

JavaJava

当前,门户中未集成用于监视 Windows 上的应用服务中的 Java 应用程序的功能,但你可以在将应用部署到应用服务之前,将 Application Insights Java 3.0 独立代理添加到你的应用程序,无需更改任何代码。The portal integration for monitoring of Java applications on App Service on Windows is currently unavailable, however, you can add Application Insights Java 3.0 standalone agent to your application without any code changes before deploying the apps to App Service. Application Insights Java 3.0 代理已正式发布。Application Insights Java 3.0 agent is generally available.

Node.jsNode.js

当前无法从门户中启用对 Windows 上的 Node.js 应用程序的监视。Monitoring for Node.js applications on Windows cannot currently be enabled from the portal. 若要监视 Node.js 应用程序,请使用 SDKTo monitor Node.js applications, use the SDK.

LinuxLinux

.NETCore.NETCore

若要监视在 Linux 上运行的 .NETCore 应用程序,请使用 SDKTo monitor .NETCore applications running on Linux, use the SDK.

JavaJava

当前无法从门户中为 Linux 上的应用服务启用 Java 应用程序监视,但你可以在将应用部署到应用服务之前,将 Application Insights Java 3.0 代理添加到你的应用。Enabling Java application monitoring for App Service on Linux from portal isn't available, but you can add Application Insights Java 3.0 agent to your app before deploying the apps to App Service. Application Insights Java 3.0 代理已正式发布。Application Insights Java 3.0 agent is generally available.

Node.jsNode.js

监视 Linux 上应用服务中的 Node.js 应用程序的功能目前为公共预览版,可以在 Azure 门户中启用,在所有区域中提供。Monitoring Node.js applications in App Service on Linux is in public preview and can be enabled in Azure portal, available in all regions.

PythonPython

使用 SDK 监视你的 Python 应用Use the SDK to monitor your Python app

Azure FunctionsAzure Functions

默认启用对 Azure Functions 的基本监视功能,该功能可以收集日志、性能、错误数据和 HTTP 请求。The basic monitoring for Azure Functions is enabled by default to collects log, performance, error data, and HTTP requests. 对于 Java 应用程序,可以使用分布式跟踪来启用更丰富的监视功能,并获取端到端事务详细信息。For Java applications, you can enable richer monitoring with distributed tracing and get the end-to-end transaction details. 适用于 Java 的此功能为公共预览版,你可以在 Azure 门户中启用它This functionality for Java is in public preview and you can enable it in Azure portal.

Azure Kubernetes 服务Azure Kubernetes Service

目前可以通过独立代理为 Java 应用程序提供 Azure Kubernetes 服务的无代码检测。Codeless instrumentation of Azure Kubernetes Service is currently available for Java applications through the standalone agent.

Azure Windows VM 和虚拟机规模集Azure Windows VMs and virtual machine scale set

适用于 Azure VM 和虚拟机规模集的自动检测可用于 .NETJavaAuto-instrumentation for Azure VMs and virtual machine scale set is available for .NET and Java.

本地服务器On-premises servers

可以轻松地为适用于 .NET 应用程序的本地 Windows 服务器Java 应用启用监视功能。You can easily enable monitoring for your on-premises Windows servers for .NET applications and for Java apps.

其他环境Other environments

通用 Java 独立代理适用于任何环境,无需检测代码。The versatile Java standalone agent works on any environment, there's no need to instrument your code. 按指南启用 Application Insights 并了解 Java 代理的强大功能。Follow the guide to enable Application Insights and read about the amazing capabilities of the Java agent. 此代理为公共预览版,在所有区域提供。The agent is in public preview and available on all regions.

后续步骤Next steps