Add managed C# AppMap agent (under managed/)#34
Draft
evlawler wants to merge 1 commit into
Draft
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.