Angular不将轨迹发送到Otel Collector
我有一个使用此操作的Otel收集器: .com/r/jaegertracing/opentelemetry-all-in-in-in-in-in-in-in-in-in
使用.NET后端运行此功能正常,因此我确定Otel设置了正确的设置。现在,我想添加角前端轨迹。
在我的app.module中:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
OpenTelemetryInterceptorModule.forRoot({
commonConfig: {
console: true,
production: false,
serviceName: 'Poc Client',
probabilitySampler: '1'
},
otelcolConfig: {
url: 'http://127.0.0.1:4317'
},
}),
OtelColExporterModule,
ConsoleSpanExporterModule,
CompositePropagatorModule,
],
providers: [],
bootstrap: [AppComponent]
})
我可以看到在Angular中生成的跟踪ID被传播到我的.NET后端,因为.NET中的跟踪包含Angular中的跟踪ID作为其父ID。
我现在的问题是,痕迹没有在Jaeger的UI中显示。那我在哪里做错了?我尝试了URL http://127.0.0.1:4317
,http://127.0.0.1.1:4317/v1/traces ,更改127.0。 0.1 to local主机,没有任何作用。如何将痕迹从Angular发送到收集器?
I have a OTel collector using this: https://hub.docker.com/r/jaegertracing/opentelemetry-all-in-one/
Running this with .NET backend works fine, so I'm sure the OTel is set up correctly. Now I want to add Angular frontend traces.
In my app.module:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
OpenTelemetryInterceptorModule.forRoot({
commonConfig: {
console: true,
production: false,
serviceName: 'Poc Client',
probabilitySampler: '1'
},
otelcolConfig: {
url: 'http://127.0.0.1:4317'
},
}),
OtelColExporterModule,
ConsoleSpanExporterModule,
CompositePropagatorModule,
],
providers: [],
bootstrap: [AppComponent]
})
I can see the trace's ID generated in Angular gets propagated to my .NET backend because the trace in .NET contained the trace ID in Angular as its parent ID.
My problem now is that the traces is not showing in Jaeger's UI. So where am I doing this wrong? I've tried different combination of URL http://127.0.0.1:4317
, http://127.0.0.1:4317/v1/traces
, changing the 127.0.0.1 to localhost, nothing works. How do I send the traces from Angular to the collector?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论