getappmap / appmap-agent-js

This project is deprecated. Please use https://github.com/getappmap/appmap-node/ to record Node.js applications.
Other
28 stars 8 forks source link

Fix collision of source urls #187

Closed lachrist closed 1 year ago

lachrist commented 1 year ago

Context

Sources can share the same url but have different contents:

This is amplified by the fact that different node processes may share the same session and each session has a unique source pool. A shared source pool was required to support instrumentation in separate process. This is the case for jest transformers (which technically is in the same process but in a different different global object).

Problem

Identifying a source from its url is not longer sufficient when dynamic sources are present.

Solution

When a source content is loaded on the frontend, we hash both the url and the content of the source to identify it on the backend. This enable support for dynamic sources. When the content is not loaded on the frontend, we use the old url-only identification which does not support dynamic sources.

appland-release commented 1 year ago

:tada: This PR is included in version 13.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: