-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
ImprovementNew feature or requestNew feature or request
Description
Describe the suggested improvement
Asp.net metrics support histogram bucket advice. This is currently not supported in the .NET Histograms.
_eventDuration = _meter.CreateHistogram(
"aspnetcore.components.handle_event.duration",
unit: "s",
description: "Duration of processing browser event. It includes business logic of the component but not affected child components.",
advice: new InstrumentAdvice<double> { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries });Once they are it might make sense to consider adding bucket advice and ways to override the defaulfts.
internal static class TransactionalSessionMetricsConstants
{
// For commit and dispatch operations - typically fast operations measured in milliseconds to low seconds
// Based on NServiceBus domain knowledge of typical transaction commit times
public static readonly IReadOnlyList<double> OperationDurationSecondsBuckets =
[0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2, 5, 10, 30];
// For message transit time - can vary widely based on infrastructure and load
// Covers milliseconds to hours for various message queuing scenarios
public static readonly IReadOnlyList<double> TransitTimeSecondsBuckets =
[0.001, 0.01, 0.1, 0.5, 1, 5, 10, 30, 60, 300, 600, 1800, 3600, 7200];
// For retry attempts - discrete values, most messages succeed on first attempt
// Covers typical retry patterns in messaging systems
public static readonly IReadOnlyList<double> AttemptCountBuckets =
[1, 2, 3, 4, 5, 10, 20, 50];
}Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ImprovementNew feature or requestNew feature or request