@@ -24,8 +24,8 @@ public class Sample
2424 */
2525
2626 // `http.request.duration`: histogram
27- public record struct RequestDurationKey ( string Path , int StatusCode ) ;
28- public readonly Dictionary < RequestDurationKey , ExponentialHistogram > RequestDuration = new ( ) ;
27+ public record struct HttpRequestDurationKey ( string Path , int StatusCode ) ;
28+ public readonly Dictionary < HttpRequestDurationKey , ExponentialHistogram > HttpRequestDuration = new ( ) ;
2929
3030 // `orders.created`: counter
3131 public ulong OrdersCreated ;
@@ -37,7 +37,7 @@ public record struct RequestDurationKey(string Path, int StatusCode);
3737
3838 public IEnumerable < LogEvent > ToLogEvents ( ILogger logger , PropertyNameMapping propertyNameMapping , DateTimeOffset timestamp )
3939 {
40- foreach ( var ( key , metric ) in RequestDuration )
40+ foreach ( var ( key , metric ) in HttpRequestDuration )
4141 {
4242 yield return ToLogEvent (
4343 logger ,
@@ -105,14 +105,14 @@ static LogEvent ToLogEvent(ILogger logger, PropertyNameMapping propertyNameMappi
105105 readonly Lock _lock = new ( ) ;
106106 Sample _current = new ( ) ;
107107
108- public void RecordRequestDuration ( Sample . RequestDurationKey key , double rawValue )
108+ public void RecordHttpRequestDuration ( Sample . HttpRequestDurationKey key , double rawValue )
109109 {
110110 lock ( _lock )
111111 {
112- if ( ! _current . RequestDuration . TryGetValue ( key , out var metric ) )
112+ if ( ! _current . HttpRequestDuration . TryGetValue ( key , out var metric ) )
113113 {
114114 metric = new ExponentialHistogram ( ) ;
115- _current . RequestDuration . Add ( key , metric ) ;
115+ _current . HttpRequestDuration . Add ( key , metric ) ;
116116 }
117117
118118 metric . Record ( rawValue ) ;
0 commit comments