我有一个叫我的.Net 6 API,然后调用数据库.

我将ApplicationInsights JS SDK和Angular插件添加到我的SPA中,并对它们进行了初始化

package.json

"@microsoft/applicationinsights-web": "2.7.4",
"@microsoft/applicationinsights-angularplugin-js": "2.8.0",

app.component.ts

export class AppComponent {
  title = 'app';
  constructor(
    private router: Router,
    private settings: SettingsService,
  ) {
    const aiInstrumentationKey = 'ApplicationInsights_InstrumentationKey';
    var angularPlugin = new AngularPlugin();
    const appInsights = new ApplicationInsights({
      config: {
        instrumentationKey: settings.settings.extensions[aiInstrumentationKey],
        distributedTracingMode: DistributedTracingModes.W3C,
        disableFetchTracking: false,
        enableCorsCorrelation: true,
        enableDebug: true,
        enableDebugExceptions: true,
        enableRequestHeaderTracking: true,
        enableResponseHeaderTracking: true,
        extensions: [angularPlugin],
        extensionConfig: {
          [angularPlugin.identifier]: { router: this.router }
        }
      }
    });
    appInsights.loadAppInsights();
  }
}

在我的API中,我添加了NuGet包,并在我的Startup类中对其进行了初始化.

.csproj

<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.20.0" />

Startup.cs

services.AddApplicationInsightsTelemetry();

I can see the end-to-end transaction details just fine and they seem to carry the Operation ID (fb0903820fa64ef092fbcd432336e949 in my example) just fine through the whole dependency chain End-to-end Transaction details

However the Application Map does not line up with this. I would expect the red arrow, but instead I'm getting two disconnected graphs. Application Map

当我点击绿色圆圈的 node 并深入到示例中时,我会进入相同的端到端事务,就像我点击SPA的左下角 node 一样.

我该怎么做才能正确连接图形?

推荐答案

应用程序 map 有一个预览选项,它有时会 destruct map .你可以try 退出预览.

Angular相关问答推荐

日语字符不受角形约束控制

PrimeNG侧栏清除primeNG消息.为什么?

角material 17 -如何从Style.scss中的主题中获取原色

图像未显示在视图屏幕上-Angular 投影

为什么在回调完成之前,可观察对象会返回?

Sass-Loader中出现分号错误:ANGLE应用程序的缩进语法中不允许使用分号

MAT-复选框更改事件未在onSubscriberCheck函数中返回选中的值

当我更新S显示的数据时,为什么我的垫表用户界面没有更新?

等待可观察性完成后再调用下一个

TypeError:this.restoreDialogRef.afterClosed 不是函数

Angular 2模板驱动表单访问组件中的ngForm

CORS 策略和 .NET Core 3.1 的问题

Angular 7 测试:NullInjectorError:No provider for ActivatedRoute

实现自定义 NgbDateParserFormatter 来更改 NgbInputDatepicker 上输入值的格式是否正确?

ConnectionBackend 没有提供程序

Angular 2 filter/search 列表

Angular 4 错误:没有 HttpClient 的provider提供者

如何在Angular中使用带有 td 属性 colspan 的属性绑定?

无法绑定到 target,因为它不是div的已知属性

如何在 Angular CLI 6: angular.json 中添加 Sass 编译?