Skip to content

Commit

Permalink
fixup! refactor: use registerCounter approach
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasl committed Nov 26, 2024
1 parent 44f1a01 commit 02faad3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/sdk/src/Telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export class Telemetry {
return undefined;
}
const snapshot = { ...this.monitoring };
this.monitoring = { libraryTraces: [] }; //TODO only clear traces!
this.monitoring.libraryTraces.forEach(trace => {
// only clear traces. keep library and version since they are registered.
trace.traces = [];
});
return snapshot;
}
}

0 comments on commit 02faad3

Please sign in to comment.