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 am wanting to log some custom properties to my ILogger logs (Application Insights Traces) in Azure Functions Isolated however whatever I add is never present in the Application Insights logs and no customDimensions are saved.
My Program.cs:
.ConfigureServices((hostContext, services) =>
{
services.AddApplicationInsightsTelemetryWorkerService();
services.ConfigureFunctionsApplicationInsights();
services.AddLogging((ILoggingBuilder builder) =>
{
builder.AddSimpleConsole(x => x.IncludeScopes = true);
builder.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.None);
// Disable Informational logs from Azure SDK. These get wired up automatically when using AddAzureClients()
// Docs -- https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging#logging-with-client-registration
builder.AddFilter("Azure.Core", LogLevel.Warning);
});
the variable "traceType" should be present in the customDimensions.
Actual behavior
The customDimensions are like this:
{"ProcessId":"4224","HostInstanceId":"51952c6f-638d-4f8f-a4c3-b59d06b6b4c4","prop__{OriginalFormat}":"[ManageMachineNumbersAsync]: Running: 1 Creating: 0 Required: 1","LogLevel":"Information","Category":"Host.Function.Console"}
The text was updated successfully, but these errors were encountered:
I've been referred to post my issue here: Azure/azure-functions-dotnet-worker#2870
I am wanting to log some custom properties to my ILogger logs (Application Insights Traces) in Azure Functions Isolated however whatever I add is never present in the Application Insights logs and no customDimensions are saved.
My Program.cs:
The packages I'm using
My code using
BeginScope
to record the variables:Investigative information
Please provide the following:
2024-11-14T16:02:01.0716062Z
88a1715d-2c98-4482-bfb7-d40bcebcf050
Repro steps
Use the code above
Expected behavior
the variable "traceType" should be present in the customDimensions.
Actual behavior
The customDimensions are like this:
{"ProcessId":"4224","HostInstanceId":"51952c6f-638d-4f8f-a4c3-b59d06b6b4c4","prop__{OriginalFormat}":"[ManageMachineNumbersAsync]: Running: 1 Creating: 0 Required: 1","LogLevel":"Information","Category":"Host.Function.Console"}
The text was updated successfully, but these errors were encountered: