@contrast/reporter
Advanced tools
Comparing version 1.29.1 to 1.30.0
@@ -18,2 +18,3 @@ import { AxiosInstance } from 'axios'; | ||
export default class Traces extends NgEndpoint { | ||
hashSet: Set<any>; | ||
accumMap: Map<RequestStore, Accum>; | ||
@@ -20,0 +21,0 @@ reporter: BaseReporter; |
@@ -57,2 +57,3 @@ "use strict"; | ||
super(core, { ...uiReporter, url: '/api/ng/traces' }); | ||
this.hashSet = new Set(); | ||
this.accumMap = new Map(); | ||
@@ -126,2 +127,3 @@ this.reporter = uiReporter; | ||
} | ||
this.hashSet.clear(); | ||
}, 1000).unref(); | ||
@@ -193,10 +195,17 @@ } | ||
// flatten | ||
complete.push(...accum.messages.map(({ ruleId, events, properties, time }) => ({ | ||
ruleId, | ||
properties, | ||
events, | ||
routes: accum.routes, | ||
request: accum.request, | ||
time, | ||
}))); | ||
accum.messages.forEach(({ ruleId, events, properties, time }) => { | ||
const traceData = { | ||
ruleId, | ||
properties, | ||
events, | ||
routes: accum.routes, | ||
request: accum.request, | ||
time | ||
}; | ||
const hash = tx.getEventHash(traceData); | ||
if (!this.hashSet.has(hash)) { | ||
this.hashSet.add(hash); | ||
complete.push({ ...traceData, hash }); | ||
} | ||
}); | ||
} | ||
@@ -212,4 +221,3 @@ } | ||
messages: complete.map((traceData, i) => { | ||
const { ruleId, routes } = traceData; | ||
const hash = traceData.hash = tx.getEventHash(traceData); | ||
const { ruleId, routes, hash } = traceData; | ||
return { | ||
@@ -216,0 +224,0 @@ appLanguage: 'Node', |
{ | ||
"name": "@contrast/reporter", | ||
"version": "1.29.1", | ||
"version": "1.30.0", | ||
"description": "Subscribes to agent messages and reports them", | ||
@@ -21,3 +21,3 @@ "license": "SEE LICENSE IN LICENSE", | ||
"dependencies": { | ||
"@contrast/common": "1.23.0", | ||
"@contrast/common": "1.24.0", | ||
"axios": "^1.6.8", | ||
@@ -24,0 +24,0 @@ "crc-32": "^1.2.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
259317
3018
+ Added@contrast/common@1.24.0(transitive)
- Removed@contrast/common@1.23.0(transitive)
Updated@contrast/common@1.24.0