Add managed C# AppMap agent (under managed/)#34
Conversation
Imports the fully managed .NET AppMap agent (a from-scratch C# port of appmap-java's architecture) developed in the Fun-with-Appmap-and-Claude repo. Placed under managed/ alongside the existing C++ CLR-profiler prototype so the two implementations can be compared without disturbing the prototype or its CI. Includes the agent (config, recorder, event model, serializer, Harmony instrumentation, SQL/built-in hooks), startup hook, ASP.NET Core and System.Web integrations, xUnit/NUnit test recorders, examples (HelloAppMap, PetClinic), unit tests, and the eShopOnWeb harness. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R1CtA2aMGjPuRYpfv2VcaX
|
@dividedmind — when you have a moment, could you take an early look at the approach here? Keeping it as a draft on purpose: this is a gut-check on direction, not a final PR. The short version: a fully managed C# AppMap agent (Harmony-based runtime rewriting, porting the appmap-java architecture) landed under Mainly looking for feedback on placement/naming and whether this direction is worth pursuing. Happy to reshape or split it up. See the PR description, Generated by Claude Code |
What this is
This PR brings the fully managed C# AppMap agent into
appmap-dotnetunder a newmanaged/subdirectory. It's a from-scratch port of the appmap-java architecture — a managed agent that rewrites methods at runtime via Harmony, rather than instrumenting IL from a C++ CLR-profiler plugin.The motivation (vs. the existing C++ prototype): being fully managed makes it cross-platform (not Linux-only) and considerably easier to evolve, while emitting the same AppMap JSON (format v1.2) as appmap-java.
Layout
Everything lands under
managed/— the existing C++ prototype and its CI are untouched, so the two implementations sit side by side for comparison. (The agent's own CI workflows are atmanaged/.github/workflows/and therefore do not auto-run in this repo.)managed/src/AppMap.Agentmanaged/src/AppMap.Attributes[Labels]attribute for application codemanaged/src/AppMap.StartupHookDOTNET_STARTUP_HOOKSentry pointmanaged/src/AppMap.AspNetCoremanaged/src/AppMap.SystemWebmanaged/src/AppMap.Testing.{Xunit,NUnit}managed/test/AppMap.Agent.Testsmanaged/examples/{HelloAppMap,PetClinic}managed/harness/See
managed/README.mdfor build/usage andmanaged/DESIGN.mdfor the design.Status
Draft, opened for @dividedmind to review the approach. Imported as-is from the prototyping repo; happy to reshape placement, naming, or split it up based on feedback.