Chris
Chris

Reputation: 1251

CoreCLR Mini-Profiler Javascript calls not working

I'm not seeing my isomorphic-fetch based XHRs show up in the mini-profiler.

My page response headers:

Content-Type:text/html; charset=utf-8
Date:Fri, 14 Jul 2017 11:23:07 GMT
Server:Kestrel
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-MiniProfiler-Ids:["16d0cc1e-9881-403e-a73c-85103e74a52f","803894bc-219e-4011-92c4-9838d8005827","58ee3691-2e1d-4592-b4b1-a1a2f0eb4b61"]
X-Powered-By:ASP.NET
X-SourceFiles:=?UTF-8?B?QzpcY29kZVxvdGhlclxwbGF5LXNzclxmZXRjaGRhdGFcNQ==?=

My fetch response headers:

Content-Type:application/json; charset=utf-8
Date:Fri, 14 Jul 2017 11:23:19 GMT
Server:Kestrel
Transfer-Encoding:chunked
X-MiniProfiler-Ids:["6bcaaaa2-9ad8-42b1-8123-5c12d22a243e","fdfddce8-fc0f-4106-bbab-8de03b22c2e5","dc24b210-8079-41ee-a231-d84d6d1401e3"]
X-Powered-By:ASP.NET
X-SourceFiles:=?UTF-8?B?QzpcY29kZVxvdGhlclxwbGF5LXNzclxhcGlcU2FtcGxlRGF0YVxXZWF0aGVyRm9yZWNhc3Rz?=

Should I be expecting some type of overlap between the two X-MiniProfiler-Ids?

If so, any suggestions for tracking this down further?

Upvotes: 2

Views: 81

Answers (1)

Nick Craver
Nick Craver

Reputation: 630569

The issue here is we're not listening to the fetch API in general (but are for popular JS frameworks) in the MiniProfiler client-side JS. In effect, we just never observe that header coming back to trigger a fetch on.

I think the best route here would be starting a discussion in a MiniProfiler issue so we can decide the best generic way to support this case. I'm 100% for it, we just need to make sure we don't break anyone in the process.

Upvotes: 2

Related Questions