@@ -90,16 +90,23 @@ private void RequestFailed(string exceptionMessage)
90
90
WriteEvent ( eventId : 3 , exceptionMessage ) ;
91
91
}
92
92
93
- [ Event ( 4 , Level = EventLevel . Informational ) ]
94
- private void ConnectionEstablished ( byte versionMajor , byte versionMinor )
93
+ [ NonEvent ]
94
+ private void ConnectionEstablished ( byte versionMajor , byte versionMinor , long connectionId , string scheme , string host , int port , IPEndPoint ? remoteEndPoint )
95
+ {
96
+ string ? remoteAddress = remoteEndPoint ? . Address ? . ToString ( ) ;
97
+ ConnectionEstablished ( versionMajor , versionMinor , connectionId , scheme , host , port , remoteAddress ) ;
98
+ }
99
+
100
+ [ Event ( 4 , Level = EventLevel . Informational , Version = 1 ) ]
101
+ private void ConnectionEstablished ( byte versionMajor , byte versionMinor , long connectionId , string scheme , string host , int port , string ? remoteAddress )
95
102
{
96
- WriteEvent ( eventId : 4 , versionMajor , versionMinor ) ;
103
+ WriteEvent ( eventId : 4 , versionMajor , versionMinor , connectionId , scheme , host , port , remoteAddress ) ;
97
104
}
98
105
99
- [ Event ( 5 , Level = EventLevel . Informational ) ]
100
- private void ConnectionClosed ( byte versionMajor , byte versionMinor )
106
+ [ Event ( 5 , Level = EventLevel . Informational , Version = 1 ) ]
107
+ private void ConnectionClosed ( byte versionMajor , byte versionMinor , long connectionId )
101
108
{
102
- WriteEvent ( eventId : 5 , versionMajor , versionMinor ) ;
109
+ WriteEvent ( eventId : 5 , versionMajor , versionMinor , connectionId ) ;
103
110
}
104
111
105
112
[ Event ( 6 , Level = EventLevel . Informational ) ]
@@ -108,10 +115,10 @@ private void RequestLeftQueue(double timeOnQueueMilliseconds, byte versionMajor,
108
115
WriteEvent ( eventId : 6 , timeOnQueueMilliseconds , versionMajor , versionMinor ) ;
109
116
}
110
117
111
- [ Event ( 7 , Level = EventLevel . Informational ) ]
112
- public void RequestHeadersStart ( )
118
+ [ Event ( 7 , Level = EventLevel . Informational , Version = 1 ) ]
119
+ public void RequestHeadersStart ( long connectionId )
113
120
{
114
- WriteEvent ( eventId : 7 ) ;
121
+ WriteEvent ( eventId : 7 , connectionId ) ;
115
122
}
116
123
117
124
[ Event ( 8 , Level = EventLevel . Informational ) ]
@@ -162,49 +169,55 @@ private void RequestFailedDetailed(string exception)
162
169
WriteEvent ( eventId : 15 , exception ) ;
163
170
}
164
171
172
+ [ Event ( 16 , Level = EventLevel . Informational ) ]
173
+ public void Redirect ( string redirectUri )
174
+ {
175
+ WriteEvent ( eventId : 16 , redirectUri ) ;
176
+ }
177
+
165
178
[ NonEvent ]
166
- public void Http11ConnectionEstablished ( )
179
+ public void Http11ConnectionEstablished ( long connectionId , string scheme , string host , int port , IPEndPoint ? remoteEndPoint )
167
180
{
168
181
Interlocked . Increment ( ref _openedHttp11Connections ) ;
169
- ConnectionEstablished ( versionMajor : 1 , versionMinor : 1 ) ;
182
+ ConnectionEstablished ( versionMajor : 1 , versionMinor : 1 , connectionId , scheme , host , port , remoteEndPoint ) ;
170
183
}
171
184
172
185
[ NonEvent ]
173
- public void Http11ConnectionClosed ( )
186
+ public void Http11ConnectionClosed ( long connectionId )
174
187
{
175
188
long count = Interlocked . Decrement ( ref _openedHttp11Connections ) ;
176
189
Debug . Assert ( count >= 0 ) ;
177
- ConnectionClosed ( versionMajor : 1 , versionMinor : 1 ) ;
190
+ ConnectionClosed ( versionMajor : 1 , versionMinor : 1 , connectionId ) ;
178
191
}
179
192
180
193
[ NonEvent ]
181
- public void Http20ConnectionEstablished ( )
194
+ public void Http20ConnectionEstablished ( long connectionId , string scheme , string host , int port , IPEndPoint ? remoteEndPoint )
182
195
{
183
196
Interlocked . Increment ( ref _openedHttp20Connections ) ;
184
- ConnectionEstablished ( versionMajor : 2 , versionMinor : 0 ) ;
197
+ ConnectionEstablished ( versionMajor : 2 , versionMinor : 0 , connectionId , scheme , host , port , remoteEndPoint ) ;
185
198
}
186
199
187
200
[ NonEvent ]
188
- public void Http20ConnectionClosed ( )
201
+ public void Http20ConnectionClosed ( long connectionId )
189
202
{
190
203
long count = Interlocked . Decrement ( ref _openedHttp20Connections ) ;
191
204
Debug . Assert ( count >= 0 ) ;
192
- ConnectionClosed ( versionMajor : 2 , versionMinor : 0 ) ;
205
+ ConnectionClosed ( versionMajor : 2 , versionMinor : 0 , connectionId ) ;
193
206
}
194
207
195
208
[ NonEvent ]
196
- public void Http30ConnectionEstablished ( )
209
+ public void Http30ConnectionEstablished ( long connectionId , string scheme , string host , int port , IPEndPoint ? remoteEndPoint )
197
210
{
198
211
Interlocked . Increment ( ref _openedHttp30Connections ) ;
199
- ConnectionEstablished ( versionMajor : 3 , versionMinor : 0 ) ;
212
+ ConnectionEstablished ( versionMajor : 3 , versionMinor : 0 , connectionId , scheme , host , port , remoteEndPoint ) ;
200
213
}
201
214
202
215
[ NonEvent ]
203
- public void Http30ConnectionClosed ( )
216
+ public void Http30ConnectionClosed ( long connectionId )
204
217
{
205
218
long count = Interlocked . Decrement ( ref _openedHttp30Connections ) ;
206
219
Debug . Assert ( count >= 0 ) ;
207
- ConnectionClosed ( versionMajor : 3 , versionMinor : 0 ) ;
220
+ ConnectionClosed ( versionMajor : 3 , versionMinor : 0 , connectionId ) ;
208
221
}
209
222
210
223
[ UnconditionalSuppressMessage ( "ReflectionAnalysis" , "IL2026:RequiresUnreferencedCode" ,
@@ -293,9 +306,9 @@ private unsafe void WriteEvent(int eventId, double arg1, byte arg2, byte arg3)
293
306
[ UnconditionalSuppressMessage ( "ReflectionAnalysis" , "IL2026:RequiresUnreferencedCode" ,
294
307
Justification = "Parameters to this method are primitive and are trimmer safe" ) ]
295
308
[ NonEvent ]
296
- private unsafe void WriteEvent ( int eventId , byte arg1 , byte arg2 )
309
+ private unsafe void WriteEvent ( int eventId , byte arg1 , byte arg2 , long arg3 )
297
310
{
298
- const int NumEventDatas = 2 ;
311
+ const int NumEventDatas = 3 ;
299
312
EventData * descrs = stackalloc EventData [ NumEventDatas ] ;
300
313
301
314
descrs [ 0 ] = new EventData
@@ -308,6 +321,67 @@ private unsafe void WriteEvent(int eventId, byte arg1, byte arg2)
308
321
DataPointer = ( IntPtr ) ( & arg2 ) ,
309
322
Size = sizeof ( byte )
310
323
} ;
324
+ descrs [ 2 ] = new EventData
325
+ {
326
+ DataPointer = ( IntPtr ) ( & arg3 ) ,
327
+ Size = sizeof ( long )
328
+ } ;
329
+
330
+ WriteEventCore ( eventId , NumEventDatas , descrs ) ;
331
+ }
332
+
333
+ [ UnconditionalSuppressMessage ( "ReflectionAnalysis" , "IL2026:RequiresUnreferencedCode" ,
334
+ Justification = "Parameters to this method are primitive and are trimmer safe" ) ]
335
+ [ NonEvent ]
336
+ private unsafe void WriteEvent ( int eventId , byte arg1 , byte arg2 , long arg3 , string ? arg4 , string arg5 , int arg6 , string ? arg7 )
337
+ {
338
+ arg4 ??= "" ;
339
+ arg5 ??= "" ;
340
+ arg7 ??= "" ;
341
+
342
+ const int NumEventDatas = 7 ;
343
+ EventData * descrs = stackalloc EventData [ NumEventDatas ] ;
344
+
345
+ fixed ( char * arg4Ptr = arg4 )
346
+ fixed ( char * arg5Ptr = arg5 )
347
+ fixed ( char * arg7Ptr = arg7 )
348
+ {
349
+ descrs [ 0 ] = new EventData
350
+ {
351
+ DataPointer = ( IntPtr ) ( & arg1 ) ,
352
+ Size = sizeof ( byte )
353
+ } ;
354
+ descrs [ 1 ] = new EventData
355
+ {
356
+ DataPointer = ( IntPtr ) ( & arg2 ) ,
357
+ Size = sizeof ( byte )
358
+ } ;
359
+ descrs [ 2 ] = new EventData
360
+ {
361
+ DataPointer = ( IntPtr ) ( & arg3 ) ,
362
+ Size = sizeof ( long )
363
+ } ;
364
+ descrs [ 3 ] = new EventData
365
+ {
366
+ DataPointer = ( IntPtr ) arg4Ptr ,
367
+ Size = ( arg4 . Length + 1 ) * sizeof ( char )
368
+ } ;
369
+ descrs [ 4 ] = new EventData
370
+ {
371
+ DataPointer = ( IntPtr ) arg5Ptr ,
372
+ Size = ( arg5 . Length + 1 ) * sizeof ( char )
373
+ } ;
374
+ descrs [ 5 ] = new EventData
375
+ {
376
+ DataPointer = ( IntPtr ) ( & arg6 ) ,
377
+ Size = sizeof ( int )
378
+ } ;
379
+ descrs [ 6 ] = new EventData
380
+ {
381
+ DataPointer = ( IntPtr ) arg7Ptr ,
382
+ Size = ( arg7 . Length + 1 ) * sizeof ( char )
383
+ } ;
384
+ }
311
385
312
386
WriteEventCore ( eventId , NumEventDatas , descrs ) ;
313
387
}
0 commit comments