Open
Description
Description
A side-car app is listening to all well-known EventCounters of the main app using a similar code as this
Dictionary<string, string> eventCounterArguments = new() { ["EventCounterIntervalSec"] = "10" };
string[] providerNames = ["System.Runtime", "Microsoft.AspNetCore.Hosting", "Microsoft-AspNetCore-Server-Kestrel", "System.Net.Http", "System.Net.Sockets", "System.Net.NameResolution"];
var providers = providerNames
.Select(n => new EventPipeProvider(n, EventLevel.Informational, 0, eventCounterArguments))
.ToArray();
EventPipeSessionConfiguration config = new(providers, requestRundown: false, requestStacks: false);
DiagnosticsClient diagnosticsClient = new(pid);
var session = await diagnosticsClient.StartEventPipeSessionAsync(config, CancellationToken.None);
EventPipeEventSource source = new(session.EventStream);
source.Dynamic.All += evt =>
{
if (evt.EventName == "EventCounters")
{
// ...
}
};
I'm expecting that it would enable some code path that increment some counters and periodic counter events to be sent to the pipe. But in this perf flamegraph, you can see that outgoing HTTP requests seem to write an event which is not expected.
Same issue with incoming requests
Is there a way to only listen to HTTP counters without the full HTTP events?
Configuration
- Linux x64
- CentOS 8
- .NET 8
Regression?
Unknown.
Data
The full flamegraph contains too much sensitive info.
Workaround
We could use the OTEL metrics that I think expose the same data but we are years away from that in my company.