[{"data":1,"prerenderedAt":253},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fgetting-started\u002Frequirements":3,"docs-navigation":180},{"id":4,"title":5,"body":6,"description":172,"extension":173,"meta":174,"navTitle":5,"navigation":175,"path":176,"seo":177,"stem":178,"__hash__":179},"docs\u002Fdocs\u002F1.getting-started\u002F3.requirements.md","Requirements",{"type":7,"value":8,"toc":165},"minimark",[9,54,59,66,109,116,142],[10,11,12,34,51],"ul",{},[13,14,15,16,20,21,25,26,29,30,33],"li",{},"The package targets ",[17,18,19],"code",{},"netstandard2.0"," for the broadest possible reach on\nthe consuming app's side: ",[22,23,24],"strong",{},".NET Core 2.0+, .NET 5+, or classic .NET\nFramework 4.6.1+"," can all reference it (",[17,27,28],{},"ConnectionStringName","'s\nclassic ",[17,31,32],{},"web.config"," support exists for exactly that last case).",[13,35,36,37,40,41,44,45,50],{},"ASP.NET Core only for the core package. ",[17,38,39],{},"UseNafasDashboard"," requires\n",[17,42,43],{},"IApplicationBuilder",". For WinForms\u002FWPF\u002Fconsole apps, see\n",[46,47,49],"a",{"href":48},"\u002Fdocs\u002Fdeployment\u002Fdesktop-apps","Desktop and other non-ASP.NET Core apps","\ninstead.",[13,52,53],{},"SQLite (zero setup) or SQL Server 2016+ for storage.",[55,56,58],"h2",{"id":57},"the-memory-usage-metric-fallback","The memory-usage metric fallback",[60,61,62,65],"p",{},[17,63,64],{},"memoryUsage"," (one of several resource metrics; logs, traces, CPU usage,\nand alerting are all unaffected either way) is read differently depending\non the host, in this order:",[67,68,69,79,93],"ol",{},[13,70,71,74,75,78],{},[22,72,73],{},".NET Core 3.0+ \u002F .NET 5+"," (the common case): ",[17,76,77],{},"GC.GetGCMemoryInfo()",",\nwhich is container-aware. It reflects a cgroup or Docker memory limit\nwhen one is set, not just physical host RAM.",[13,80,81,84,85,88,89,92],{},[22,82,83],{},"Classic .NET Framework 4.6.1+, or .NET Core 2.x, on Windows",": falls\nback to the Win32 ",[17,86,87],{},"GlobalMemoryStatusEx"," API (the same one .NET\nFramework apps have always used for this, no managed equivalent exists\nthere). This reports whole-machine physical memory, ",[22,90,91],{},"not","\ncontainer\u002FJob-Object-aware, so a process capped by a Job Object memory\nlimit will under-report here.",[13,94,95,100,101,104,105,108],{},[22,96,97,98],{},"Any non-Windows host without ",[17,99,77],{}," (practically:\n.NET Core 2.x on Linux\u002FmacOS): reports ",[17,102,103],{},"0",". This path is explicitly\ngated to Windows only, so a Linux container never attempts a\n",[17,106,107],{},"kernel32.dll"," call in the first place.",[55,110,112,113],{"id":111},"classic-net-framework-sqlite-set-an-explicit-platformtarget","Classic .NET Framework + SQLite: set an explicit ",[17,114,115],{},"PlatformTarget",[60,117,118,120,121,125,126,129,130,133,134,137,138,141],{},[17,119,19],{}," compatibility means .NET Framework can ",[122,123,124],"em",{},"reference"," this\npackage, but the SQLite native driver still needs to know which\narchitecture to load. On .NET Core\u002F.NET 5+, the runtime's own RID-graph\nresolves this automatically regardless of how the project was built; on\nclassic .NET Framework there's no such mechanism, so an ",[17,127,128],{},"AnyCPU"," build can\ncopy a native ",[17,131,132],{},"e_sqlite3.dll"," that doesn't match the process's actual\nbitness at run time, failing with ",[17,135,136],{},"Library e_sqlite3 not found"," \u002F ",[17,139,140],{},"%1 is not a valid Win32 application",".",[60,143,144,145,148,149,152,153,156,157,160,161,164],{},"Set ",[17,146,147],{},"\u003CPlatformTarget>x64\u003C\u002FPlatformTarget>"," (or ",[17,150,151],{},"x86",", matching your\ndeployment) and ",[17,154,155],{},"\u003CPrefer32Bit>false\u003C\u002FPrefer32Bit>"," explicitly in the\nconsuming ",[17,158,159],{},".csproj"," to fix it. Verified against a real net48 console host\nin ",[17,162,163],{},"Nafas.Observability.Server.NetFrameworkSample",". SQL Server storage\nisn't affected (no native driver to resolve this way).",{"title":166,"searchDepth":167,"depth":167,"links":168},"",2,[169,170],{"id":57,"depth":167,"text":58},{"id":111,"depth":167,"text":171},"Classic .NET Framework + SQLite: set an explicit PlatformTarget","Target framework reach, storage options, and the memory-metric fallback behavior by host.","md",{},true,"\u002Fdocs\u002Fgetting-started\u002Frequirements",{"title":5,"description":172},"docs\u002F1.getting-started\u002F3.requirements","phoJ1e5yS3SKZEZUc_KbhIwVLkEkqrXEg1ilSdfKrOQ",[181],{"title":182,"path":183,"stem":184,"children":185},"Docs","\u002Fdocs","docs",[186,189,204,217,230,241,249],{"title":187,"path":183,"stem":188},"Documentation","docs\u002Findex",{"title":190,"path":191,"stem":192,"children":193,"page":203},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[194,198,202],{"title":195,"path":196,"stem":197},"Why Nafas","\u002Fdocs\u002Fgetting-started\u002Fwhy-nafas","docs\u002F1.getting-started\u002F1.why-nafas",{"title":199,"path":200,"stem":201},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F2.quick-start",{"title":5,"path":176,"stem":178},false,{"title":205,"path":206,"stem":207,"children":208,"page":203},"How It Works","\u002Fdocs\u002Fhow-it-works","docs\u002F2.how-it-works",[209,213],{"title":210,"path":211,"stem":212},"What gets captured, and how","\u002Fdocs\u002Fhow-it-works\u002Fwhat-gets-captured","docs\u002F2.how-it-works\u002F1.what-gets-captured",{"title":214,"path":215,"stem":216},"How it's built internally","\u002Fdocs\u002Fhow-it-works\u002Finternals","docs\u002F2.how-it-works\u002F2.internals",{"title":218,"path":219,"stem":220,"children":221,"page":203},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002F3.configuration",[222,226],{"title":223,"path":224,"stem":225},"Configuration options","\u002Fdocs\u002Fconfiguration\u002Foptions","docs\u002F3.configuration\u002F1.options",{"title":227,"path":228,"stem":229},"Security","\u002Fdocs\u002Fconfiguration\u002Fsecurity","docs\u002F3.configuration\u002F2.security",{"title":231,"path":232,"stem":233,"children":234,"page":203},"Deployment","\u002Fdocs\u002Fdeployment","docs\u002F4.deployment",[235,239],{"title":236,"path":237,"stem":238},"Multi-instance deployments","\u002Fdocs\u002Fdeployment\u002Fmulti-instance","docs\u002F4.deployment\u002F1.multi-instance",{"title":49,"path":48,"stem":240},"docs\u002F4.deployment\u002F2.desktop-apps",{"title":242,"path":243,"stem":244,"children":245,"page":203},"Alerting","\u002Fdocs\u002Falerting","docs\u002F5.alerting",[246],{"title":242,"path":247,"stem":248},"\u002Fdocs\u002Falerting\u002Falert-rules","docs\u002F5.alerting\u002F1.alert-rules",{"title":250,"path":251,"stem":252},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F6.contributing",1789842022089]