手动配置应用程序过滤器
APM Insight Agent 配置变更
- 进入 APM Insight .NET Agent 安装文件夹。
- 打开 DotNetAgent 文件夹。
- 打开 appfilter.conf 文件并编辑以下键:
示例:use.app.filters=true (default)
use.apminsight.appnames=true (default is false)
include.app.names={json formatted appnames}include.app.names = { "Default Web Site/" : "ServerRoot", "Default Web Site/Services/wcf1" : "Service1", ... } - 复制此 appfilter.conf 文件并粘贴至以下位置:
-
- Agent 数据路径:
%SystemDrive%\\ProgramData\\DotnetAgent
- Windows Server 2003 的 Agent 数据路径:
%SystemDrive%\\Documents and Settings\\All Users\\Application Data\\DotNetAgent
- Agent 数据路径:
-
- 重启 .NET Agent Windows 服务以使更改生效。
IIS Manager 变更
- 启动 IIS Manager。
- 选择 Web 应用程序。
- 对于 IIS 7.0 及更高版本,进入"应用程序设置"部分,添加以下键值对。这是避免应用程序名称冲突所必需的。
key = apminsight.appname
value = <custom application name> (Use this name in configuration file) - 对于 IIS 6.0 版本,打开 web.Config 文件并按如下方式编辑 <appSettings> 部分。
<appSettings>
<add key="apminsight.appname" value="<custom application name>"/>
...
</appSettings> - 保存 web.Config 文件。
- 对所有需要监控的应用程序重复上述步骤。
