[proprosal] telemetry for Codex-uwp is crashing {windows sandbox apps/ Universal Windows Platform apps}UWP-Compliant Approach - (for windows - codex-dekstop-app )
What variant of Codex are you using?
App (the users who report issues)
What feature would you like to see?
if the user crashes on some function -- have a way to monitor CODEX APP -- in the past there was an issue that caused the app to crash ---
- either users were able to collect debug .dmp ,, or .log file (or even see an exception window [which is indursty standard to atleast give a scary exceptoin if the app crash -- ] )
- Either openai employees are able to see a surplus of user errors
[proprosal:] mandetory user data colelction , if the Codex App has crashed and which function it happen
----> the next logical step would be monitor which users repeat the crash more often --- so crashes are happening ---- alternatively if it works --- this can be used to monitor deadlocks or whatever
----
the story:
I say the comment https://github.com/openai/codex/issues/24598#issuecomment-4546343937
and https://github.com/openai/codex/issues/24998#issuecomment-4571545629
where I asked a user to attach - the codex app into a debugger (and replicated the crash)
one on the maintainers original closed the issue
<img width="1655" height="305" alt="Image" src="https://github.com/user-attachments/assets/b01b4940-1bf3-4b9e-bee5-3b79d804fa42" />
its important , if the Codex App is crashing there is a way to monitor ,
````
PS C:\Users\User> Get-StartApps | Where-Object {$_.Name -like "Codex"}
Name AppID
---- -----
Codex OpenAI.Codex_2p2nqsd0c76g0!App
1. Initialize the Shell COM object and launch the app
$shell = New-Object -ComObject Shell.Application
$shell.ShellExecute("shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App")
````
Offcial microsfot UWP docmentation
https://learn.microsoft.com/en-us/windows/uwp/develop/
there is
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/app-lifecycle#app-launch
there is ApplicationExecutionState IF== NotRunningIt can also be in this state if it was running but then crashed?????
https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml?view=winrt-28000
generally I assumed it has to do with this windows.ui.xaml , which is a UWP thing (image related , see the UWP) im not sure if it has to do something with non UWP apps some how
<img width="854" height="330" alt="Image" src="https://github.com/user-attachments/assets/657a9c41-d1ca-4a6b-ad5b-78f6225fc011" />
using aI I get two suggests
!!!(AI GENERATED SLOP)
#include "pch.h"
#include "App.h"
#include <winrt/Windows.UI.Xaml.h>
#include <iostream>
using namespace winrt;
using namespace Windows::UI::Xaml;
// Implementation of your App class constructor/initialization
App::App()
{
InitializeComponent();
// The official Microsoft UWP approach to registering a native C++ failure handler
UnhandledException([this](IInspectable const& sender, UnhandledExceptionEventArgs const& e)
{
// 1. Mark that we are actively handling/noting the event telemetry-wise
// Setting this to true attempts to keep the app alive if safe,
// but for critical crashes, we use it to safely dump logs before dying.
bool isHandled = e.Handled();
// 2. Extract the native Windows HRESULT exception code
hresult exceptionCode = e.Exception();
// 3. Extract the text message associated with the failure
hstring exceptionMessage = e.Message();
// 4. Safely pipe this diagnostic to a crash reporting dashboard, file or console
// Note: Writing directly to relative files is blocked by UWP sandbox boundaries!
// OutputDebugString is explicitly allowed and visible to diagnostic debuggers.
std::wstring logOutput = L"CRASH LOGGED: " + std::wstring(exceptionMessage.c_str()) +
L" (HRESULT: " + std::to_wstring(exceptionCode) + L")\n";
OutputDebugStringW(logOutput.c_str());
// If it's a structural catastrophic failure, allow the OS to cleanly record it
if (!isHandled)
{
// The process terminates naturally, prompting the underlying Windows
// Error Reporting (WER) system to grab the local minidump configuration.
}
});
}```
second is using
public event UnhandledExceptionEventHandler? UnhandledException;
https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-appdomain-unhandledexception
https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception?view=net-10.0
which the LLM call legacy for some reason ?
5 Comments
This message is an exprimentation --- the prompt given was ``
main stream ideas how companies monitor UWP apps by standard``llm chat
VVVV
main stream ideas how companies monitor UWP apps by standardresponse it gave me
<html>
<body>
<!--StartFragment--><h1 data-pm-slice="0 0 []">UWP & Packaged Windows App Monitoring: Quick Reference</h1><h2>The Core Constraint</h2><p>UWP apps run in an isolated <strong>AppContainer sandbox</strong>. Standard Win32 monitoring methods (direct local file writes or global process hooks) are blocked. Telemetry must bypass the sandbox via OS-level reporting or authorized network streams.</p><h2>The 3 Standard Pipelines</h2><h3>1. Zero-Code: Microsoft Partner Center (WER)</h3><ul><li><p><strong>Mechanics</strong>: Windows Error Reporting (WER) intercepts crashes at the OS level, bypasses the sandbox, and uploads a <code>.dmp</code> (minidump) file.</p></li><li><p><strong>Prerequisite</strong>: Match compilation Symbol files (<code>.pdb</code>/<code>.appxsym</code>) must be uploaded to Partner Center to decrypt call stacks.</p></li><li><p><strong>Best For</strong>: Microsoft Store and enterprise package flight applications.</p></li></ul><h3>2. Enterprise: Azure Monitor (Application Insights)</h3><ul><li><p><strong>Mechanics</strong>: Client-side SDK integrated into the application entry point (<code>App.xaml.cs</code>). Tracks managed exceptions and custom analytics in real time.</p></li><li><p><strong>Analytics</strong>: Queried via Kusto Query Language (KQL) in the Azure Portal.</p></li><li><p><strong>Best For</strong>: Side-loaded Line-of-Business (LOB) and internal corporate applications.</p></li></ul><h3>3. Cross-Platform APM: Sentry & Datadog</h3><ul><li><p><strong>Mechanics</strong>: Single-pane platform-agnostic SDKs initialized at startup. Sentry excels at capturing both C# managed exceptions and native C++ crashes.</p></li><li><p><strong>Best For</strong>: Teams managing multi-platform portfolios (Web, Desktop, Mobile) under a unified dashboard.</p></li></ul><h2>Decision Matrix</h2>
Solution | Code Overhead | Infrastructure | Best Use Case
-- | -- | -- | --
Partner Center (WER) | None | Managed by Microsoft | Store apps, OS-level crash dumps
Azure Monitor | Low (SDK init) | Azure Cloud Subscription | Custom events, API latency, LOB apps
Sentry / Datadog | Low (SDK init) | Third-Party SaaS | Multi-OS pipelines, unified dev dashboard
<!--EndFragment-->
</body>
</html>
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
[codex] not a duplicate , its a feature request
also
https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights
only exist for .net (but I assumed thats how codex app is built anywyas)
again my hope is --- that
codex has improved telemtry good job