Skip to content

Commit 67a35b0

Browse files
authored
Merge pull request #556 from AikidoSec/sink-kind
Add kind to sink stats
2 parents f1c1c64 + e5ea1e2 commit 67a35b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+431
-110
lines changed

library/agent/Agent.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ t.test("it sends heartbeat when reached max timings", async () => {
549549
agent.start([]);
550550
for (let i = 0; i < 1000; i++) {
551551
agent.getInspectionStatistics().onInspectedCall({
552-
sink: "mongodb",
552+
operation: "MongoDB.query",
553+
kind: "nosql_op",
553554
blocked: false,
554555
durationInMs: 0.1,
555556
attackDetected: false,
@@ -563,7 +564,8 @@ t.test("it sends heartbeat when reached max timings", async () => {
563564
]);
564565
for (let i = 0; i < 4001; i++) {
565566
agent.getInspectionStatistics().onInspectedCall({
566-
sink: "mongodb",
567+
operation: "MongoDB.query",
568+
kind: "nosql_op",
567569
blocked: false,
568570
durationInMs: 0.1,
569571
attackDetected: false,

library/agent/Agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export class Agent {
308308
time: Date.now(),
309309
agent: this.getAgentInfo(),
310310
stats: {
311-
sinks: stats.sinks,
311+
operations: stats.operations,
312312
startedAt: stats.startedAt,
313313
endedAt: endedAt,
314314
requests: stats.requests,

0 commit comments

Comments
 (0)