Migrate app insights logging to open telemetry - Azure Functions don't show invocation

Marcel Croes (DutchWorkz BV) 56 Reputation points
2025-06-09T10:55:03.3933333+00:00

After migrating to open telemetry for logging, Azure Functions don't log invocation anymore. The logs ARE showing up as tracings in app insights. It's just the invocations page is empty. It's a timer trigger.

my host.json

{
  "version": "2.0",
  "telemetryMode": "openTelemetry",
  "logging": {
    "fileLoggingMode": "debugOnly",
    "logLevel": {
      "default": "Warning",
      "Host.Aggregator": "Trace",
      "Host.Results": "Information",
      "Function": "Information"
    },
    "applicationInsights": {
      "LogLevel": {
        "Default": "Information"
      },
      "samplingSettings": {
        "isEnabled": false
      }
    }
  }
}

I'm basically using the defaults generated by Aspire with service defaults using builder.AddServiceDefaults()

Any help?


Full program.cs


var builder = FunctionsApplication.CreateBuilder(args);

builder.AddServiceDefaults();

builder.Services

    .AddDbContext<UserProfilesDbContext>(options => options.UseSqlServer(builder.Configuration.GetConnectionString("UserProfilesDbConnection")));

builder.Services.AddAzureClients(client =>

{

    var settings = builder.Configuration.GetSection("AzureOpenAI");

    client.AddSearchIndexClient(new Uri(settings["SearchEndpoint"]), new AzureKeyCredential(settings["SearchKey"]));

});

builder.Services.AddSingleton<AiSearchService>();

await builder.Build().RunAsync();

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

Accepted answer
  1. Khadeer Ali 5,990 Reputation points Microsoft External Staff Moderator
    2025-06-09T12:23:14.82+00:00

    @Marcel Croes (DutchWorkz BV) ,

    Thanks for reaching out.
    When the host is configured to use OpenTelemetry, the Azure Portal currently doesn't support log streaming or recent function invocation traces via the "Function Invocations" page.

    This is a known limitation documented by Microsoft:

    https://learn.microsoft.com/en-us/azure/azure-functions/opentelemetry-howto?tabs=app-insights&pivots=programming-language-powershell#considerations-for-opentelemetry

    As a result, while the traces are correctly collected and available in Application Insights (e.g., via the Logs (Analytics) tab), the standard invocation tracking UI will remain empty.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for "Was this answer helpful." And if you have any further questions, let us know.


0 additional answers

Sort by: Most helpful

Your answer

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