使用 net.tcp 端点监视 WCF 服务

Monitor WCF service with net.tcp endpoint

我们有一个带有 net.tcp 端点的 WCF 服务,但 Azure 的应用程序洞察监视器似乎无法使用它。它不适用于 net.tcp 端点,还是我们必须做些什么才能让它工作?

Application Insights SDK 不支持自动收集 net.tcp 终结点的遥测数据。您可以自己实施,方法是扩展 WCF 通道以收集所需信息并使用 TelemetryClient.TrackRequest 方法将其发送到 Application Insights。

虽然没有对 WCF 的官方支持,但我们有一个实验性的 SDK 包,它支持检测 WCF 服务有一段时间了:https://github.com/Microsoft/ApplicationInsights-SDK-Labs/tree/master/WCF