Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request telemetry is not sent for long-running requests #2882

Open
johnib opened this issue Jul 5, 2024 · 0 comments
Open

Request telemetry is not sent for long-running requests #2882

johnib opened this issue Jul 5, 2024 · 0 comments
Labels

Comments

@johnib
Copy link

johnib commented Jul 5, 2024

    <ItemGroup>
        <PackageReference Include="Azure.Identity" Version="1.11.3" />
        <PackageReference Include="Azure.ResourceManager" Version="1.12.0" />
        <PackageReference Include="Azure.ResourceManager.Monitor" Version="1.3.1" />
        <PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.6.0" />
        <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
        <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.2"/>
        <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
    </ItemGroup>
  • Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the *.csproj file):
    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
    </PropertyGroup>
  • Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
    MacOS, running locally on my macbook.

Describe the bug

  • I have a simple aspnet controller with few APIs
  • No special instrumentation, the most basic installation of the SDK with the default configuration:
{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=<REDACTED>;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/"
  },
  "AllowedHosts": "*"
}
// program.cs DI registration of appinsights:

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddApplicationInsightsTelemetry(); // basic
builder.Services.AddControllers();
builder.Services.AddAuthentication();
builder.Services.AddAuthorization();
  • Request and Dependency telemetry items are sent perfectly for most requests, with exact correlation

The issue is

  • Some of the API calls take long to complete, depending on the work involved in it -- it could reach to 10-20 minutes even, in which thousands of Dependency calls will be made, like in this picture:

All of these dependency calls were originated from the same incoming request

image
  • No parent request telemetry:
image image

To Reproduce

  • Have a simple aspnet webapi project, with one API that generates a lot of telemetry items during it's 10-20 minutes execution.
  • If you'd like a ready-to-run project I'll provide you with my own one via Teams (I'm Microsoft employee).

For Immediate Support

For immediate support relating to the Application Insights .NET SDK we encourage you to file an Azure Support Request with Microsoft Azure instead of filing a GitHub Issue in this repository.
You can do so by going online to the Azure portal and submitting a support request. Access to subscription management and billing support is included with your Microsoft Azure subscription, and technical support is provided through one of the Azure Support Plans. For step-by-step guidance for the Azure portal, see How to create an Azure support request. Alternatively, you can create and manage your support tickets programmatically using the Azure Support ticket REST API

@johnib johnib added the bug label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant