getappmap / appmap-node

AppMap client agent for Node.js
Other
10 stars 4 forks source link

Trim long values in AppMaps #77

Open dividedmind opened 10 months ago

dividedmind commented 10 months ago

The AppMap specification says this about value fields:

string describing the object. This is not a strict JSON serialization, but rather a display string which is intended for the user. These strings should be trimmed in length to 100 characters.

appmap-node currently does no such trimming. Note this can be particularly inconvenient when eg. this is an object of a rich class with many methods. Perhaps it's worthwhile to filter the dump to only own properties. We want to make these 100 chars count.

kgilpin commented 10 months ago

Yes the agent is free to implement this limit in whatever makes the most sense. 100 characters is guidance - it’s important to have some limit to avoid outputting pathologically long strings and blowing up the map files.