Set the service name

pull/178/head
David Fowler 2022-11-05 13:48:46 -07:00
parent ff0e668fc6
commit a4f3b401e6
1 changed files with 6 additions and 4 deletions

View File

@ -102,10 +102,12 @@ builder.Services.AddOpenTelemetryMetrics(metrics =>
builder.Logging.AddOpenTelemetry(logging =>
{
logging.AddAzureMonitorLogExporter(o =>
{
o.ConnectionString = azureMonitorConnectionString;
});
logging
.SetResourceBuilder(serviceResource)
.AddAzureMonitorLogExporter(o =>
{
o.ConnectionString = azureMonitorConnectionString;
});
});
var app = builder.Build();