Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Custom attributes are not populated in Azure Functions' Request spans

Open
#2,917 7 comments 0 reactions 1 assignee View on GitHub

@heyams is already working on this.

Since Feb 15, 2023.

Assessment

This issue has not been assessed yet.

Description

Needs: Attention :wave:
Expected behavior

In Application Insights, custom attributes assigned to Request spans (function invocations) are present.

Actual behavior

Only predefined pre-populated attributes are available as custom dimensions (like TriggerReason, FullName, OperationName etc) for function invocation requests.

Sample Application
public class TestFunctionHandler extends FunctionInvoker<Event, String> {

    @FunctionName("testFunction")
    public void execute(
            @QueueTrigger(name = "event", queueName = "queue",
                          connection = "AzureWebJobsStorage")
            Event event,
            ExecutionContext context) {
        Span.current().setAttribute("TestAttribute", event.getData());
        handleRequest(job, context);
    }
}

This code supposed to produce "TestAttribute" in "Custom Dimensions" panel of App Insights' Request, however, only default attributes are actually populated there:

Screenshot 2023-02-15 at 23 25 19
Dominant language
Java
Stars
327
Forks
222
Avg merge
22h 34m
Merged PRs (30d)
14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/ApplicationInsights-Java

All issues in microsoft/ApplicationInsights-Java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.