How do i get the application trace logs deployed in Azure Container Logs to view in Application Insights?
_logger.LogInformation("get ratings " );
I have tried both Instrumentation key and ConnectionString to daprAI properties with no luck. I can view the logs in Logs Analytics (ContainerAppConsoleLogs_CL) so logs are working fine.
resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2022-03-01' = {
name: containerAppEnvironmentName
location: location
tags: tags
properties: {
appLogsConfiguration: {
destination: 'log-analytics'
logAnalyticsConfiguration: {
customerId: logAnalyticsWs.properties.customerId
sharedKey: logAnalyticsWs.listKeys().primarySharedKey
}
}
daprAIConnectionString: appInsights.properties.ConnectionString
daprAIInstrumentationKey: appInsights.properties.InstrumentationKey
vnetConfiguration: null
zoneRedundant: false
}
}
Have added the env values in the container apps container
{ name: 'ApplicationInsights__ConnectionString'
value: appInsights.properties.ConnectionString
}
{
name: 'ApplicationInsights__InstrumentationKey'
value: appInsights.properties.InstrumentationKey
}
bootstrapped in the program files
builder.Services.AddApplicationInsightsTelemetry();