Skip to content

Commit

Permalink
feat: Include parameter names in the AppMap index
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilpin committed Nov 16, 2023
1 parent d0f1199 commit 00a66d3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/cli/src/fingerprint/canonicalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const algorithms = {
packageDependencies: require('./canonicalize/packageDependencies'),
sqlNormalized: require('./canonicalize/sqlNormalized'),
sqlTables: require('./canonicalize/sqlTables'),
parameters: require('./canonicalize/parameters'),
};
/* eslint-enable global-require */

Expand Down
15 changes: 15 additions & 0 deletions packages/cli/src/fingerprint/canonicalize/parameters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable class-methods-use-this */
const Unique = require('./unique');
const { collectParameters } = require('../../fulltext/collectParameters');

class Canonicalize extends Unique {
functionCall(event) {
return collectParameters(event);
}

httpServerRequest(event) {
return collectParameters(event);
}
}

module.exports = (appmap) => new Canonicalize(appmap).execute();
6 changes: 5 additions & 1 deletion packages/cli/src/fingerprint/fingerprinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const renameFile = promisify(gracefulFs.rename);
/**
* CHANGELOG
*
* * # 1.4.0
*
* * Include parameter names in the index.
*
* * # 1.3.0
*
* * Include exceptions in the index.
Expand Down Expand Up @@ -49,7 +53,7 @@ const renameFile = promisify(gracefulFs.rename);
* * Fix handling of parent assignment in normalization.
* * sql can contain the analysis (action, tables, columns), and/or the normalized query string.
*/
export const VERSION = '1.2.0';
export const VERSION = '1.4.0';

const MAX_APPMAP_SIZE = 50 * 1024 * 1024;

Expand Down

0 comments on commit 00a66d3

Please sign in to comment.