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

[BUG] Live Metrics maxes out at 10 requests/second #47575

Open
vRune4 opened this issue Dec 16, 2024 · 3 comments
Open

[BUG] Live Metrics maxes out at 10 requests/second #47575

vRune4 opened this issue Dec 16, 2024 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Distro Monitor OpenTelemetry Distro needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@vRune4
Copy link

vRune4 commented Dec 16, 2024

Library name and version

Azure.Monitor.OpenTelemetry.AspNetCore 1.2.0

Describe the bug

LiveMetrics is showing incorrect values.
Specifically 'Requests per second'.

Similar to: #46417

Expected behavior

When hammering the service with thousands of requests, live metrics should reflect that.

Actual behavior

Live metrics maxes out at 10 requests per second:
Image

Meanwhile, Azure Load Testing shows this:
Image

Reproduction Steps

  1. Create a new asp.net 9 application
  2. Program.cs: builder.Services.AddOpenTelemetry().UseAzureMonitor(opt => { opt.Credential = credential; opt.ConnectionString = appInsightsConnectionString; });
  3. This example uses the Northwind database
  4. Create a new controller:
[Route("api/[controller]")]
[ApiController]
public class OrdersController(SqlConnection sqlConnection) : ControllerBase
{
	private readonly SqlConnection _sqlConnection = sqlConnection;

	[HttpGet]
	public ActionResult<IAsyncEnumerable<Order>> Get()
	{
		return Ok(ReadOrdersAsync());
	}

	private async IAsyncEnumerable<Order> ReadOrdersAsync()
	{
		using SqlCommand command = _sqlConnection.CreateCommand();
		command.CommandText = "SELECT TOP 15 OrderID, COALESCE(CustomerID, ''), COALESCE(EmployeeID, 0), COALESCE(OrderDate, '1900-01-01') FROM Orders";
		await _sqlConnection.OpenAsync();
		using SqlDataReader reader = await command.ExecuteReaderAsync();

		while (await reader.ReadAsync())
		{
			yield return new Order
			{
				OrderID = reader.GetInt32(0),
				CustomerID = reader.GetString(1),
				EmployeeID = reader.GetInt32(2),
				OrderDate = reader.GetDateTime(3)
			};
		}
	}
}

Environment

Azure Container Apps
.Net 9

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 16, 2024
@jsquire jsquire added Service Attention Workflow: This issue is responsible by Azure service team. Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Monitor - Distro Monitor OpenTelemetry Distro and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Dec 16, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rajkumar-rangaraj @TimothyMothra.

@TimothyMothra
Copy link
Contributor

Hi @vRune4, there was a bug in LiveMetrics.
That bug fix is available in https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0-beta.2.
Would you be able to test this beta and confirm that this resolves your issue?

@vRune4
Copy link
Author

vRune4 commented Dec 24, 2024

Beta 2 is a huge improvement:
Image

The Load Tester presents this graph:
Image

Difficult to compare those two, but at least now it is possible to see that the service is being hit by lots of traffic.

App insights:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Distro Monitor OpenTelemetry Distro needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants