我有一个自定义模块:
public class MyTelemetryModule : ITelemetryModule
{
public MyTelemetryModule()
{
Debug.WriteLine("MyTelemetryModule: " + nameof(MyTelemetryModule));
}
public void Initialize(TelemetryConfiguration configuration)
{
Debug.WriteLine("MyTelemetryModule: " + nameof(Initialize));
}
public void OnBeginRequest(HttpContext context)
{
Debug.WriteLine("MyTelemetryModule: " + nameof(OnBeginRequest));
}
public void OnEndRequest(HttpContext context)
{
Debug.WriteLine("MyTelemetryModule: " + nameof(OnEndRequest));
}
}
它已在applicationinsights.config
中注册,但只调用了构造函数和Initialise()
方法。