@multiplayer-app/session-recorder-common 0.0.12 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/SessionRecorderHttpInstrumentationHooksNode.js +2 -5
- package/dist/esm/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -1
- package/dist/esm/SessionRecorderIdGenerator.js +1 -1
- package/dist/esm/SessionRecorderIdGenerator.js.map +1 -1
- package/dist/esm/SessionRecorderTraceIdRatioBasedSampler.d.ts.map +1 -1
- package/dist/esm/SessionRecorderTraceIdRatioBasedSampler.js +4 -4
- package/dist/esm/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
- package/dist/esm/constants.base.d.ts +2 -0
- package/dist/esm/constants.base.d.ts.map +1 -1
- package/dist/esm/constants.base.js +2 -0
- package/dist/esm/constants.base.js.map +1 -1
- package/dist/esm/sdk/capture-exception.js.map +1 -1
- package/dist/esm/sdk/id-generator.js.map +1 -1
- package/dist/esm/sdk/save-continuous-deb-session.d.ts.map +1 -1
- package/dist/esm/sdk/save-continuous-deb-session.js +2 -2
- package/dist/esm/sdk/save-continuous-deb-session.js.map +1 -1
- package/dist/esm/sdk/schemify.d.ts.map +1 -1
- package/dist/esm/sdk/schemify.js +0 -1
- package/dist/esm/sdk/schemify.js.map +1 -1
- package/dist/esm/sdk/set-attribute.js +2 -2
- package/dist/esm/sdk/set-attribute.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esnext/SessionRecorderHttpInstrumentationHooksNode.js +2 -5
- package/dist/esnext/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -1
- package/dist/esnext/SessionRecorderIdGenerator.js +1 -1
- package/dist/esnext/SessionRecorderIdGenerator.js.map +1 -1
- package/dist/esnext/SessionRecorderTraceIdRatioBasedSampler.d.ts.map +1 -1
- package/dist/esnext/SessionRecorderTraceIdRatioBasedSampler.js +4 -4
- package/dist/esnext/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
- package/dist/esnext/constants.base.d.ts +2 -0
- package/dist/esnext/constants.base.d.ts.map +1 -1
- package/dist/esnext/constants.base.js +2 -0
- package/dist/esnext/constants.base.js.map +1 -1
- package/dist/esnext/sdk/capture-exception.js.map +1 -1
- package/dist/esnext/sdk/id-generator.js.map +1 -1
- package/dist/esnext/sdk/save-continuous-deb-session.d.ts.map +1 -1
- package/dist/esnext/sdk/save-continuous-deb-session.js +2 -2
- package/dist/esnext/sdk/save-continuous-deb-session.js.map +1 -1
- package/dist/esnext/sdk/schemify.d.ts.map +1 -1
- package/dist/esnext/sdk/schemify.js +0 -1
- package/dist/esnext/sdk/schemify.js.map +1 -1
- package/dist/esnext/sdk/set-attribute.js +2 -2
- package/dist/esnext/sdk/set-attribute.js.map +1 -1
- package/dist/esnext/tsconfig.esnext.tsbuildinfo +1 -1
- package/dist/src/SessionRecorderHttpInstrumentationHooksNode.js +0 -3
- package/dist/src/SessionRecorderHttpInstrumentationHooksNode.js.map +1 -1
- package/dist/src/SessionRecorderIdGenerator.js.map +1 -1
- package/dist/src/SessionRecorderTraceIdRatioBasedSampler.d.ts.map +1 -1
- package/dist/src/SessionRecorderTraceIdRatioBasedSampler.js +3 -3
- package/dist/src/SessionRecorderTraceIdRatioBasedSampler.js.map +1 -1
- package/dist/src/constants.base.d.ts +2 -0
- package/dist/src/constants.base.d.ts.map +1 -1
- package/dist/src/constants.base.js +3 -1
- package/dist/src/constants.base.js.map +1 -1
- package/dist/src/sdk/capture-exception.js.map +1 -1
- package/dist/src/sdk/id-generator.js.map +1 -1
- package/dist/src/sdk/save-continuous-deb-session.d.ts.map +1 -1
- package/dist/src/sdk/save-continuous-deb-session.js +1 -1
- package/dist/src/sdk/save-continuous-deb-session.js.map +1 -1
- package/dist/src/sdk/schemify.d.ts.map +1 -1
- package/dist/src/sdk/schemify.js +0 -1
- package/dist/src/sdk/schemify.js.map +1 -1
- package/dist/src/sdk/set-attribute.js.map +1 -1
- package/package.json +3 -3
- package/src/SessionRecorderHttpInstrumentationHooksNode.ts +7 -7
- package/src/SessionRecorderIdGenerator.ts +1 -1
- package/src/SessionRecorderTraceIdRatioBasedSampler.ts +7 -4
- package/src/constants.base.ts +4 -0
- package/src/sdk/capture-exception.ts +3 -3
- package/src/sdk/id-generator.ts +12 -12
- package/src/sdk/save-continuous-deb-session.ts +17 -17
- package/src/sdk/schemify.ts +0 -1
- package/src/sdk/set-attribute.ts +11 -11
package/src/sdk/set-attribute.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
trace,
|
|
3
3
|
AttributeValue,
|
|
4
|
-
context
|
|
4
|
+
context,
|
|
5
5
|
} from '@opentelemetry/api'
|
|
6
6
|
import {
|
|
7
7
|
ATTR_MULTIPLAYER_HTTP_RESPONSE_BODY,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ATTR_MULTIPLAYER_RPC_RESPONSE_MESSAGE,
|
|
13
13
|
ATTR_MULTIPLAYER_GRPC_REQUEST_MESSAGE,
|
|
14
14
|
ATTR_MULTIPLAYER_GRPC_RESPONSE_MESSAGE,
|
|
15
|
-
ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY
|
|
15
|
+
ATTR_MULTIPLAYER_MESSAGING_MESSAGE_BODY,
|
|
16
16
|
} from '../constants.base'
|
|
17
17
|
import mask, { sensitiveFields, sensitiveHeaders } from './mask'
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@ export const setAttribute = (key: string, value: AttributeValue) => {
|
|
|
37
37
|
*/
|
|
38
38
|
export const setHttpRequestBody = (
|
|
39
39
|
body: any,
|
|
40
|
-
options: { mask: boolean } = { mask: true }
|
|
40
|
+
options: { mask: boolean } = { mask: true },
|
|
41
41
|
) => {
|
|
42
42
|
const span = trace.getSpan(context.active())
|
|
43
43
|
if (!span) return
|
|
@@ -57,7 +57,7 @@ export const setHttpRequestBody = (
|
|
|
57
57
|
*/
|
|
58
58
|
export const setHttpRequestHeaders = (
|
|
59
59
|
body: any,
|
|
60
|
-
options: { mask: boolean } = { mask: true }
|
|
60
|
+
options: { mask: boolean } = { mask: true },
|
|
61
61
|
) => {
|
|
62
62
|
const span = trace.getSpan(context.active())
|
|
63
63
|
if (!span) return
|
|
@@ -77,7 +77,7 @@ export const setHttpRequestHeaders = (
|
|
|
77
77
|
*/
|
|
78
78
|
export const setHttpResponseBody = (
|
|
79
79
|
body: any,
|
|
80
|
-
options: { mask: boolean } = { mask: true }
|
|
80
|
+
options: { mask: boolean } = { mask: true },
|
|
81
81
|
) => {
|
|
82
82
|
const span = trace.getSpan(context.active())
|
|
83
83
|
if (!span) return
|
|
@@ -97,7 +97,7 @@ export const setHttpResponseBody = (
|
|
|
97
97
|
*/
|
|
98
98
|
export const setHttpResponseHeaders = (
|
|
99
99
|
body: any,
|
|
100
|
-
options: { mask: boolean } = { mask: true }
|
|
100
|
+
options: { mask: boolean } = { mask: true },
|
|
101
101
|
) => {
|
|
102
102
|
const span = trace.getSpan(context.active())
|
|
103
103
|
if (!span) return
|
|
@@ -117,7 +117,7 @@ export const setHttpResponseHeaders = (
|
|
|
117
117
|
*/
|
|
118
118
|
export const setMessageBody = (
|
|
119
119
|
body: any,
|
|
120
|
-
options: { mask: boolean } = { mask: true }
|
|
120
|
+
options: { mask: boolean } = { mask: true },
|
|
121
121
|
) => {
|
|
122
122
|
const span = trace.getSpan(context.active())
|
|
123
123
|
if (!span) return
|
|
@@ -137,7 +137,7 @@ export const setMessageBody = (
|
|
|
137
137
|
*/
|
|
138
138
|
export const setRpcRequestMessage = (
|
|
139
139
|
body: any,
|
|
140
|
-
options: { mask: boolean } = { mask: true }
|
|
140
|
+
options: { mask: boolean } = { mask: true },
|
|
141
141
|
) => {
|
|
142
142
|
const span = trace.getSpan(context.active())
|
|
143
143
|
if (!span) return
|
|
@@ -157,7 +157,7 @@ export const setRpcRequestMessage = (
|
|
|
157
157
|
*/
|
|
158
158
|
export const setRpcResponseMessage = (
|
|
159
159
|
body: any,
|
|
160
|
-
options: { mask: boolean } = { mask: true }
|
|
160
|
+
options: { mask: boolean } = { mask: true },
|
|
161
161
|
) => {
|
|
162
162
|
const span = trace.getSpan(context.active())
|
|
163
163
|
if (!span) return
|
|
@@ -177,7 +177,7 @@ export const setRpcResponseMessage = (
|
|
|
177
177
|
*/
|
|
178
178
|
export const setGrpcRequestMessage = (
|
|
179
179
|
body: any,
|
|
180
|
-
options: { mask: boolean } = { mask: true }
|
|
180
|
+
options: { mask: boolean } = { mask: true },
|
|
181
181
|
) => {
|
|
182
182
|
const span = trace.getSpan(context.active())
|
|
183
183
|
if (!span) return
|
|
@@ -197,7 +197,7 @@ export const setGrpcRequestMessage = (
|
|
|
197
197
|
*/
|
|
198
198
|
export const setGrpcResponseMessage = (
|
|
199
199
|
body: any,
|
|
200
|
-
options: { mask: boolean } = { mask: true }
|
|
200
|
+
options: { mask: boolean } = { mask: true },
|
|
201
201
|
) => {
|
|
202
202
|
const span = trace.getSpan(context.active())
|
|
203
203
|
if (!span) return
|