Unable to see the attributes under customdimenstions of Application insights when set the attributes using ILogger.BeginScope

Rayappa Bankapur (CSEC) 0 Reputation points
2026-09-09T13:57:59.5933333+00:00

was trying to set attribute and its value using ILogger.BeginScope in Azure function. theory says when we set the attributes using ILogger.BeginScope, we can see those attributes under customdimensions section of Application insights. have tried and troubleshooted possible ways but don't see those attributes in Application insights. Is there proven steps/configurations? please share with me.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Newest
  1. Tejaswini Billakurthi 435 Reputation points Microsoft External Staff Moderator
    2026-09-09T14:30:19.93+00:00

    Hello @Rayappa Bankapur (CSEC) ,

    Thank you for reaching out to Microsoft Q & A!

    There are a couple of common reasons why BeginScope values don't appear as individual customDimensions entries:

    Verify the type passed to BeginScope. Application Insights expands scope values into custom properties only when the scope is an IReadOnlyCollection<KeyValuePair<string, object>> (for example, a dictionary). Otherwise, the scope is typically stored under a single Scope property. See: Application Insights logging scopes.

    Verify the property name being queried. For Azure Functions in-process apps, custom properties are often prefixed with prop__. For example, MyKey may appear as customDimensions.prop__MyKey. Reviewing the raw customDimensions payload can help confirm how the properties are stored.

    If using .NET isolated worker, verify that Application Insights is configured directly in the worker process, as scope properties may not be preserved when logs are relayed through the Functions host. See: Azure Functions isolated worker Application Insights guidance.

    Could you confirm whether the Function App is running in-process or .NET isolated, and share a sample customDimensions payload from a trace where the scope values are expected?

    Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.