You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a ASP.NET Core web application packaged as a container that I add to other application AppHosts.
I am trying to get OTEL signals (traces mostly) to appear in the Aspire dashboard but nothing is showing up and I have no idea what I am missing.
public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder)
{
builder.Logging.AddOpenTelemetry(logging =>
{
logging.IncludeScopes = true;
logging.IncludeFormattedMessage = true;
});
var otel = builder.Services.AddOpenTelemetry()
.ConfigureResource(r => r.AddService(builder.Environment.ApplicationName));
otel.WithMetrics(m => m
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation()
.AddRuntimeInstrumentation()
.AddMeter(Telemetry.ServiceName));
otel.WithTracing(t => t
.AddSource(IdentityServerConstants.Tracing.Basic)
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation());
builder.AddOpenTelemetryExporters();
return builder;
}
private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder)
{
var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]);
if (useOtlpExporter)
{
builder.Services.AddOpenTelemetry().UseOtlpExporter();
}
return builder;
}
The dashboard shows that the container is getting all the OTEL environment variables injected but stuff is still not showing up in the traces, logs and metrics pages.
I tried to enable ASPIRE_ALLOW_UNSECURED_TRANSPORT in the launch profile of the AppHost, but I'm not sure if that makes the trick, especially because we purged the http entry
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe related to #4131
I have a ASP.NET Core web application packaged as a container that I add to other application AppHosts.
I am trying to get OTEL signals (traces mostly) to appear in the Aspire dashboard but nothing is showing up and I have no idea what I am missing.
The dashboard shows that the container is getting all the OTEL environment variables injected but stuff is still not showing up in the traces, logs and metrics pages.
I tried to enable
ASPIRE_ALLOW_UNSECURED_TRANSPORT
in the launch profile of the AppHost, but I'm not sure if that makes the trick, especially because we purged thehttp
entryBeta Was this translation helpful? Give feedback.
All reactions