MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / normalizeSession

Function normalizeSession

packages/deno/test/normalize.ts:43–61  ·  view source on GitHub ↗

* Normalizes a session so that in can be compared to an expected event * * All properties that are timestamps, versions, ids or variables that may vary * by platform are replaced with placeholder strings

(session: Session)

Source from the content-addressed store, hash-verified

41 * by platform are replaced with placeholder strings
42 */
43function normalizeSession(session: Session): Session {
44 if (session.sid) {
45 session.sid = '{{id}}';
46 }
47
48 if (session.started) {
49 session.started = 0;
50 }
51
52 if (session.timestamp) {
53 session.timestamp = 0;
54 }
55
56 if (session.duration) {
57 session.duration = 0;
58 }
59
60 return session;
61}
62
63/**
64 * Normalizes an event so that in can be compared to an expected event

Callers 1

normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected