Skip to content

Extract AppDynamics-specific logic from Monkey.js into a plugin system #340

Description

@svrnm

Summary

The core replacement engine (Monkey.js) contains hardcoded AppDynamics-specific corner cases. These should be isolated behind a plugin or namespace hook so vendor-specific behavior is extensible without modifying the core engine.

Problem

AppDynamics-specific logic (special DOM handling, namespace commands in src/commands/appdynamics/) is woven into the core engine. This makes the engine harder to understand and couples it to one vendor's UI patterns.

Suggested approach

  • Define a plugin interface that namespaced command sets can implement (e.g., beforeApply, afterApply, custom DOM walkers)
  • Move AppDynamics-specific branches in Monkey.js behind this interface
  • Register the appdynamics namespace as the first plugin
  • Ensure existing @namespace[] = appdynamics configs continue to work unchanged

Risks

  • Must preserve backward compatibility with existing configurations
  • Performance impact of plugin dispatch in the hot loop needs measurement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions