@multiplayer-app/session-recorder-node 1.3.35 → 1.3.37
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/eslint.config.js +226 -0
- package/examples/cli/dist/config.d.ts +16 -0
- package/examples/cli/dist/config.d.ts.map +1 -0
- package/examples/cli/dist/config.js +42 -0
- package/examples/cli/dist/config.js.map +1 -0
- package/examples/cli/dist/index.d.ts +2 -0
- package/examples/cli/dist/index.d.ts.map +1 -0
- package/examples/cli/dist/index.js +29 -0
- package/examples/cli/dist/index.js.map +1 -0
- package/examples/cli/dist/opentelemetry.d.ts +2 -0
- package/examples/cli/dist/opentelemetry.d.ts.map +1 -0
- package/examples/cli/dist/opentelemetry.js +135 -0
- package/examples/cli/dist/opentelemetry.js.map +1 -0
- package/examples/cli/package.json +2 -2
- package/examples/cli/tsconfig.json +3 -0
- package/examples/http-server/dist/api.d.ts +3 -0
- package/examples/http-server/dist/api.d.ts.map +1 -0
- package/examples/http-server/dist/api.js +19 -0
- package/examples/http-server/dist/api.js.map +1 -0
- package/examples/http-server/dist/config.d.ts +13 -0
- package/examples/http-server/dist/config.d.ts.map +1 -0
- package/examples/http-server/dist/config.js +22 -0
- package/examples/http-server/dist/config.js.map +1 -0
- package/examples/http-server/dist/index.d.ts +3 -0
- package/examples/http-server/dist/index.d.ts.map +1 -0
- package/examples/http-server/dist/index.js +40 -0
- package/examples/http-server/dist/index.js.map +1 -0
- package/examples/http-server/dist/opentelemetry.d.ts +2 -0
- package/examples/http-server/dist/opentelemetry.d.ts.map +1 -0
- package/examples/http-server/dist/opentelemetry.js +135 -0
- package/examples/http-server/dist/opentelemetry.js.map +1 -0
- package/examples/http-server/package.json +2 -2
- package/examples/http-server/tsconfig.json +3 -0
- package/package.json +3 -3
- package/tsconfig.json +3 -0
package/eslint.config.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import tseslint from '@typescript-eslint/eslint-plugin'
|
|
4
|
+
import tsparser from '@typescript-eslint/parser'
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
js.configs.recommended,
|
|
8
|
+
{
|
|
9
|
+
ignores: [
|
|
10
|
+
'node_modules/**',
|
|
11
|
+
'dist/**',
|
|
12
|
+
'build/**',
|
|
13
|
+
'coverage/**',
|
|
14
|
+
'*.min.js',
|
|
15
|
+
'*.bundle.js',
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser: tsparser,
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaVersion: 'latest',
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
},
|
|
26
|
+
globals: {
|
|
27
|
+
...globals.browser,
|
|
28
|
+
// Browser globals
|
|
29
|
+
window: 'readonly',
|
|
30
|
+
document: 'readonly',
|
|
31
|
+
navigator: 'readonly',
|
|
32
|
+
localStorage: 'readonly',
|
|
33
|
+
sessionStorage: 'readonly',
|
|
34
|
+
console: 'readonly',
|
|
35
|
+
setTimeout: 'readonly',
|
|
36
|
+
clearTimeout: 'readonly',
|
|
37
|
+
setInterval: 'readonly',
|
|
38
|
+
clearInterval: 'readonly',
|
|
39
|
+
requestAnimationFrame: 'readonly',
|
|
40
|
+
cancelAnimationFrame: 'readonly',
|
|
41
|
+
fetch: 'readonly',
|
|
42
|
+
Headers: 'readonly',
|
|
43
|
+
HeadersInit: 'readonly',
|
|
44
|
+
Request: 'readonly',
|
|
45
|
+
RequestInfo: 'readonly',
|
|
46
|
+
Response: 'readonly',
|
|
47
|
+
FormData: 'readonly',
|
|
48
|
+
File: 'readonly',
|
|
49
|
+
Blob: 'readonly',
|
|
50
|
+
URL: 'readonly',
|
|
51
|
+
URLSearchParams: 'readonly',
|
|
52
|
+
AbortController: 'readonly',
|
|
53
|
+
AbortSignal: 'readonly',
|
|
54
|
+
ReadableStream: 'readonly',
|
|
55
|
+
WritableStream: 'readonly',
|
|
56
|
+
TransformStream: 'readonly',
|
|
57
|
+
TextEncoder: 'readonly',
|
|
58
|
+
TextDecoder: 'readonly',
|
|
59
|
+
HTMLElement: 'readonly',
|
|
60
|
+
HTMLButtonElement: 'readonly',
|
|
61
|
+
HTMLInputElement: 'readonly',
|
|
62
|
+
HTMLTextAreaElement: 'readonly',
|
|
63
|
+
HTMLAnchorElement: 'readonly',
|
|
64
|
+
XMLHttpRequest: 'readonly',
|
|
65
|
+
XMLHttpRequestBodyInit: 'readonly',
|
|
66
|
+
MouseEvent: 'readonly',
|
|
67
|
+
InputEvent: 'readonly',
|
|
68
|
+
MessageEvent: 'readonly',
|
|
69
|
+
EventListener: 'readonly',
|
|
70
|
+
MutationObserver: 'readonly',
|
|
71
|
+
NodeJS: 'readonly',
|
|
72
|
+
Window: 'readonly',
|
|
73
|
+
Document: 'readonly',
|
|
74
|
+
IDBDatabase: 'readonly',
|
|
75
|
+
indexedDB: 'readonly',
|
|
76
|
+
// Node.js globals
|
|
77
|
+
process: 'readonly',
|
|
78
|
+
Buffer: 'readonly',
|
|
79
|
+
__dirname: 'readonly',
|
|
80
|
+
__filename: 'readonly',
|
|
81
|
+
global: 'readonly',
|
|
82
|
+
module: 'readonly',
|
|
83
|
+
require: 'readonly',
|
|
84
|
+
exports: 'readonly',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
plugins: {
|
|
88
|
+
'@typescript-eslint': tseslint,
|
|
89
|
+
},
|
|
90
|
+
rules: {
|
|
91
|
+
// TypeScript specific rules
|
|
92
|
+
'no-namespace': 'off',
|
|
93
|
+
'no-useless-escape': 'off',
|
|
94
|
+
'no-self-assign': 'off',
|
|
95
|
+
'no-useless-catch': 'off',
|
|
96
|
+
'prefer-namespace-keyword': 'off',
|
|
97
|
+
'no-empty-function': 'off',
|
|
98
|
+
'no-unused-vars': 'off',
|
|
99
|
+
'no-explicit-any': 'off',
|
|
100
|
+
'ban-types': 'off',
|
|
101
|
+
'object-curly-spacing': ['error', 'always'],
|
|
102
|
+
'space-before-blocks': 'error',
|
|
103
|
+
'keyword-spacing': 'error',
|
|
104
|
+
|
|
105
|
+
// General rules
|
|
106
|
+
'prefer-const': 'error',
|
|
107
|
+
'block-spacing': ['error', 'always'],
|
|
108
|
+
'keyword-spacing': [
|
|
109
|
+
'error',
|
|
110
|
+
{
|
|
111
|
+
before: true,
|
|
112
|
+
after: true,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
'indent': ['error', 2, { SwitchCase: 1 }],
|
|
116
|
+
'linebreak-style': ['error', 'unix'],
|
|
117
|
+
'quotes': ['error', 'single'],
|
|
118
|
+
'semi': ['error', 'never'],
|
|
119
|
+
'comma-dangle': ['error', 'always-multiline'],
|
|
120
|
+
'no-console': 'warn',
|
|
121
|
+
'object-curly-spacing': ['error', 'always'],
|
|
122
|
+
'space-in-parens': ['error', 'never'],
|
|
123
|
+
'array-bracket-spacing': ['error', 'never'],
|
|
124
|
+
'no-trailing-spaces': 'error',
|
|
125
|
+
'no-multi-spaces': 'error',
|
|
126
|
+
'no-lonely-if': 'error',
|
|
127
|
+
'key-spacing': 'error',
|
|
128
|
+
'no-useless-escape': 'error',
|
|
129
|
+
'no-self-assign': 'error',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
files: ['**/*.js', '**/*.mjs'],
|
|
134
|
+
languageOptions: {
|
|
135
|
+
ecmaVersion: 'latest',
|
|
136
|
+
sourceType: 'module',
|
|
137
|
+
globals: {
|
|
138
|
+
// Browser globals
|
|
139
|
+
window: 'readonly',
|
|
140
|
+
document: 'readonly',
|
|
141
|
+
navigator: 'readonly',
|
|
142
|
+
localStorage: 'readonly',
|
|
143
|
+
sessionStorage: 'readonly',
|
|
144
|
+
console: 'readonly',
|
|
145
|
+
setTimeout: 'readonly',
|
|
146
|
+
clearTimeout: 'readonly',
|
|
147
|
+
setInterval: 'readonly',
|
|
148
|
+
clearInterval: 'readonly',
|
|
149
|
+
requestAnimationFrame: 'readonly',
|
|
150
|
+
cancelAnimationFrame: 'readonly',
|
|
151
|
+
fetch: 'readonly',
|
|
152
|
+
Headers: 'readonly',
|
|
153
|
+
HeadersInit: 'readonly',
|
|
154
|
+
Request: 'readonly',
|
|
155
|
+
RequestInfo: 'readonly',
|
|
156
|
+
Response: 'readonly',
|
|
157
|
+
FormData: 'readonly',
|
|
158
|
+
File: 'readonly',
|
|
159
|
+
Blob: 'readonly',
|
|
160
|
+
URL: 'readonly',
|
|
161
|
+
URLSearchParams: 'readonly',
|
|
162
|
+
AbortController: 'readonly',
|
|
163
|
+
AbortSignal: 'readonly',
|
|
164
|
+
ReadableStream: 'readonly',
|
|
165
|
+
WritableStream: 'readonly',
|
|
166
|
+
TransformStream: 'readonly',
|
|
167
|
+
TextEncoder: 'readonly',
|
|
168
|
+
TextDecoder: 'readonly',
|
|
169
|
+
HTMLElement: 'readonly',
|
|
170
|
+
HTMLButtonElement: 'readonly',
|
|
171
|
+
HTMLInputElement: 'readonly',
|
|
172
|
+
HTMLTextAreaElement: 'readonly',
|
|
173
|
+
HTMLAnchorElement: 'readonly',
|
|
174
|
+
XMLHttpRequest: 'readonly',
|
|
175
|
+
XMLHttpRequestBodyInit: 'readonly',
|
|
176
|
+
MouseEvent: 'readonly',
|
|
177
|
+
InputEvent: 'readonly',
|
|
178
|
+
MessageEvent: 'readonly',
|
|
179
|
+
EventListener: 'readonly',
|
|
180
|
+
MutationObserver: 'readonly',
|
|
181
|
+
NodeJS: 'readonly',
|
|
182
|
+
Window: 'readonly',
|
|
183
|
+
Document: 'readonly',
|
|
184
|
+
IDBDatabase: 'readonly',
|
|
185
|
+
indexedDB: 'readonly',
|
|
186
|
+
// Node.js globals
|
|
187
|
+
process: 'readonly',
|
|
188
|
+
Buffer: 'readonly',
|
|
189
|
+
__dirname: 'readonly',
|
|
190
|
+
__filename: 'readonly',
|
|
191
|
+
global: 'readonly',
|
|
192
|
+
module: 'readonly',
|
|
193
|
+
require: 'readonly',
|
|
194
|
+
exports: 'readonly',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
rules: {
|
|
198
|
+
'no-useless-escape': 'off',
|
|
199
|
+
'no-self-assign': 'off',
|
|
200
|
+
'prefer-const': 'error',
|
|
201
|
+
'block-spacing': ['error', 'always'],
|
|
202
|
+
'keyword-spacing': [
|
|
203
|
+
'error',
|
|
204
|
+
{
|
|
205
|
+
before: true,
|
|
206
|
+
after: true,
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
'indent': ['error', 2, { SwitchCase: 1 }],
|
|
210
|
+
'linebreak-style': ['error', 'unix'],
|
|
211
|
+
'quotes': ['error', 'single'],
|
|
212
|
+
'semi': ['error', 'never'],
|
|
213
|
+
'comma-dangle': ['error', 'always-multiline'],
|
|
214
|
+
'no-console': 'warn',
|
|
215
|
+
'object-curly-spacing': ['error', 'always'],
|
|
216
|
+
'space-in-parens': ['error', 'never'],
|
|
217
|
+
'array-bracket-spacing': ['error', 'never'],
|
|
218
|
+
'no-trailing-spaces': 'error',
|
|
219
|
+
'no-multi-spaces': 'error',
|
|
220
|
+
'no-lonely-if': 'error',
|
|
221
|
+
'key-spacing': 'error',
|
|
222
|
+
'no-useless-escape': 'error',
|
|
223
|
+
'no-self-assign': 'error',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const NODE_ENV: string;
|
|
2
|
+
export declare const isProduction: boolean;
|
|
3
|
+
export declare const LOG_LEVEL: string;
|
|
4
|
+
export declare const COMPONENT_NAME: string;
|
|
5
|
+
export declare const COMPONENT_VERSION: string;
|
|
6
|
+
export declare const ENVIRONMENT: string;
|
|
7
|
+
export declare const MULTIPLAYER_OTLP_KEY: string;
|
|
8
|
+
export declare const OTLP_TRACES_ENDPOINT: string;
|
|
9
|
+
export declare const OTLP_LOGS_ENDPOINT: string;
|
|
10
|
+
export declare const MULTIPLAYER_OTLP_SPAN_RATIO: number;
|
|
11
|
+
export declare let DIALOGUE_HUB_SERVICE_URL: string;
|
|
12
|
+
export declare let EPOCH_ENGINE_SERVICE_URL: string;
|
|
13
|
+
export declare let MINDS_OF_TIME_SERVICE_URL: string;
|
|
14
|
+
export declare let VAULT_OF_TIME_SERVICE_URL: string;
|
|
15
|
+
export declare const MULTIPLAYER_BACKEND_SOURCE: string;
|
|
16
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAwC,CAAA;AAC7D,eAAO,MAAM,YAAY,SAA4B,CAAA;AAErD,eAAO,MAAM,SAAS,QAA6D,CAAA;AAEnF,eAAO,MAAM,cAAc,QAAqG,CAAA;AAChI,eAAO,MAAM,iBAAiB,QAA6C,CAAA;AAC3E,eAAO,MAAM,WAAW,QAAuC,CAAA;AAE/D,eAAO,MAAM,oBAAoB,EAAuC,MAAM,CAAA;AAM9E,eAAO,MAAM,oBAAoB,QAA8E,CAAA;AAC/G,eAAO,MAAM,kBAAkB,QAA0E,CAAA;AAEzG,eAAO,MAAM,2BAA2B,QAEhC,CAAA;AAER,eAAO,IAAI,wBAAwB,QAAK,CAAA;AACxC,eAAO,IAAI,wBAAwB,QAAK,CAAA;AACxC,eAAO,IAAI,yBAAyB,QAAK,CAAA;AACzC,eAAO,IAAI,yBAAyB,QAAK,CAAA;AAEzC,eAAO,MAAM,0BAA0B,QAAyD,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MULTIPLAYER_BACKEND_SOURCE = exports.VAULT_OF_TIME_SERVICE_URL = exports.MINDS_OF_TIME_SERVICE_URL = exports.EPOCH_ENGINE_SERVICE_URL = exports.DIALOGUE_HUB_SERVICE_URL = exports.MULTIPLAYER_OTLP_SPAN_RATIO = exports.OTLP_LOGS_ENDPOINT = exports.OTLP_TRACES_ENDPOINT = exports.MULTIPLAYER_OTLP_KEY = exports.ENVIRONMENT = exports.COMPONENT_VERSION = exports.COMPONENT_NAME = exports.LOG_LEVEL = exports.isProduction = exports.NODE_ENV = void 0;
|
|
5
|
+
exports.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
6
|
+
exports.isProduction = exports.NODE_ENV === 'production';
|
|
7
|
+
exports.LOG_LEVEL = process.env.LOG_LEVEL || (exports.isProduction ? 'info' : 'debug');
|
|
8
|
+
exports.COMPONENT_NAME = ((_a = process.env.npm_package_name) === null || _a === void 0 ? void 0 : _a.split('/').pop()) || process.env.SERVICE_NAME || 'timegate';
|
|
9
|
+
exports.COMPONENT_VERSION = process.env.npm_package_version || '0.0.1';
|
|
10
|
+
exports.ENVIRONMENT = process.env.ENVIRONMENT || 'staging';
|
|
11
|
+
exports.MULTIPLAYER_OTLP_KEY = process.env.MULTIPLAYER_OTLP_KEY;
|
|
12
|
+
if (!exports.MULTIPLAYER_OTLP_KEY) {
|
|
13
|
+
throw new Error('MULTIPLAYER_OTLP_KEY is not set');
|
|
14
|
+
}
|
|
15
|
+
exports.OTLP_TRACES_ENDPOINT = process.env.OTLP_TRACES_ENDPOINT || 'https://api.multiplayer.app/v1/traces';
|
|
16
|
+
exports.OTLP_LOGS_ENDPOINT = process.env.OTLP_LOGS_ENDPOINT || 'https://api.multiplayer.app/v1/logs';
|
|
17
|
+
exports.MULTIPLAYER_OTLP_SPAN_RATIO = process.env.MULTIPLAYER_OTLP_SPAN_RATIO
|
|
18
|
+
? Number(process.env.MULTIPLAYER_OTLP_SPAN_RATIO)
|
|
19
|
+
: 0.01;
|
|
20
|
+
exports.DIALOGUE_HUB_SERVICE_URL = '';
|
|
21
|
+
exports.EPOCH_ENGINE_SERVICE_URL = '';
|
|
22
|
+
exports.MINDS_OF_TIME_SERVICE_URL = '';
|
|
23
|
+
exports.VAULT_OF_TIME_SERVICE_URL = '';
|
|
24
|
+
exports.MULTIPLAYER_BACKEND_SOURCE = process.env.MULTIPLAYER_BACKEND_SOURCE || 'production';
|
|
25
|
+
switch (process.env.MULTIPLAYER_BACKEND_SOURCE) {
|
|
26
|
+
case 'production':
|
|
27
|
+
exports.DIALOGUE_HUB_SERVICE_URL = 'https://api.demo.multiplayer.app/v1/dialogue-hub';
|
|
28
|
+
exports.EPOCH_ENGINE_SERVICE_URL = 'https://api.demo.multiplayer.app/v1/epoch-engine';
|
|
29
|
+
exports.MINDS_OF_TIME_SERVICE_URL = 'https://api.demo.multiplayer.app/v1/minds-of-time';
|
|
30
|
+
exports.VAULT_OF_TIME_SERVICE_URL = 'https://api.demo.multiplayer.app/v1/vault-of-time';
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
exports.DIALOGUE_HUB_SERVICE_URL = 'http://localhost:3000/v1/dialogue-hub';
|
|
34
|
+
exports.EPOCH_ENGINE_SERVICE_URL = 'http://localhost:3000/v1/epoch-engine';
|
|
35
|
+
exports.MINDS_OF_TIME_SERVICE_URL = 'http://localhost:3000/v1/minds-of-time';
|
|
36
|
+
exports.VAULT_OF_TIME_SERVICE_URL = 'http://localhost:3000/v1/vault-of-time';
|
|
37
|
+
}
|
|
38
|
+
exports.DIALOGUE_HUB_SERVICE_URL = process.env.DIALOGUE_HUB_SERVICE_URL || exports.DIALOGUE_HUB_SERVICE_URL;
|
|
39
|
+
exports.EPOCH_ENGINE_SERVICE_URL = process.env.EPOCH_ENGINE_SERVICE_URL || exports.EPOCH_ENGINE_SERVICE_URL;
|
|
40
|
+
exports.MINDS_OF_TIME_SERVICE_URL = process.env.MINDS_OF_TIME_SERVICE_URL || exports.MINDS_OF_TIME_SERVICE_URL;
|
|
41
|
+
exports.VAULT_OF_TIME_SERVICE_URL = process.env.VAULT_OF_TIME_SERVICE_URL || exports.VAULT_OF_TIME_SERVICE_URL;
|
|
42
|
+
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BAAwB,GAAG,EAAE,CAAA;AAC7B,QAAA,yBAAyB,GAAG,EAAE,CAAA;AAC9B,QAAA,yBAAyB,GAAG,EAAE,CAAA;AAE5B,QAAA,0BAA0B,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,YAAY,CAAA;AAEhG,QAAQ,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,CAAC;IAC/C,KAAK,YAAY;QACf,gCAAwB,GAAG,kDAAkD,CAAA;QAC7E,gCAAwB,GAAG,kDAAkD,CAAA;QAC7E,iCAAyB,GAAG,mDAAmD,CAAA;QAC/E,iCAAyB,GAAG,mDAAmD,CAAA;QAC/E,MAAK;IACP;QACE,gCAAwB,GAAG,uCAAuC,CAAA;QAClE,gCAAwB,GAAG,uCAAuC,CAAA;QAClE,iCAAyB,GAAG,wCAAwC,CAAA;QACpE,iCAAyB,GAAG,wCAAwC,CAAA;AACxE,CAAC;AAED,gCAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,gCAAwB,CAAA;AAC3F,gCAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,gCAAwB,CAAA;AAC3F,iCAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,iCAAyB,CAAA;AAC9F,iCAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,iCAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const opentelemetry_1 = require("./opentelemetry");
|
|
4
|
+
const session_recorder_node_1 = require("@multiplayer-app/session-recorder-node");
|
|
5
|
+
const config_1 = require("./config");
|
|
6
|
+
const main = async () => {
|
|
7
|
+
session_recorder_node_1.sessionRecorder.init({
|
|
8
|
+
apiKey: config_1.MULTIPLAYER_OTLP_KEY,
|
|
9
|
+
traceIdGenerator: opentelemetry_1.idGenerator,
|
|
10
|
+
resourceAttributes: {
|
|
11
|
+
componentName: config_1.COMPONENT_NAME,
|
|
12
|
+
componentVersion: config_1.COMPONENT_VERSION,
|
|
13
|
+
environment: config_1.ENVIRONMENT,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
await session_recorder_node_1.sessionRecorder.start(session_recorder_node_1.SessionType.MANUAL, {
|
|
17
|
+
name: 'Test nodejs cli app debug session',
|
|
18
|
+
resourceAttributes: {
|
|
19
|
+
version: 1,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
// do something here
|
|
23
|
+
await session_recorder_node_1.sessionRecorder.stop();
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}, 15000);
|
|
27
|
+
};
|
|
28
|
+
main();
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mDAA6C;AAC7C,kFAG+C;AAC/C,qCAKiB;AAEjB,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACtB,uCAAe,CAAC,IAAI,CAAC;QACnB,MAAM,EAAE,6BAAoB;QAC5B,gBAAgB,EAAE,2BAAW;QAC7B,kBAAkB,EAAE;YAClB,aAAa,EAAE,uBAAc;YAC7B,gBAAgB,EAAE,0BAAiB;YACnC,WAAW,EAAE,oBAAW;SACzB;KACF,CAAC,CAAA;IAEF,MAAM,uCAAe,CAAC,KAAK,CACzB,mCAAW,CAAC,MAAM,EAClB;QACE,IAAI,EAAE,mCAAmC;QACzC,kBAAkB,EAAE;YAClB,OAAO,EAAE,CAAC;SACX;KACF,CACF,CAAA;IAED,oBAAoB;IAEpB,MAAM,uCAAe,CAAC,IAAI,EAAE,CAAA;IAE5B,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC,CAAA;AAED,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opentelemetry.d.ts","sourceRoot":"","sources":["../src/opentelemetry.ts"],"names":[],"mappings":"AAkFA,eAAO,MAAM,WAAW,KAAmC,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.idGenerator = void 0;
|
|
40
|
+
const os_1 = require("os");
|
|
41
|
+
const sdk_node_1 = require("@opentelemetry/sdk-node");
|
|
42
|
+
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
43
|
+
const auto_instrumentations_node_1 = require("@opentelemetry/auto-instrumentations-node");
|
|
44
|
+
const resources_1 = require("@opentelemetry/resources");
|
|
45
|
+
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
46
|
+
const api_1 = __importDefault(require("@opentelemetry/api"));
|
|
47
|
+
// import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"
|
|
48
|
+
const core_1 = require("@opentelemetry/core");
|
|
49
|
+
const session_recorder_node_1 = require("@multiplayer-app/session-recorder-node");
|
|
50
|
+
const sdk_logs_1 = require("@opentelemetry/sdk-logs");
|
|
51
|
+
const apiLogs = __importStar(require("@opentelemetry/api-logs"));
|
|
52
|
+
// import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'
|
|
53
|
+
const config_1 = require("./config");
|
|
54
|
+
// NOTE: Update instrumentation configuration as needed
|
|
55
|
+
// For more see: https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node
|
|
56
|
+
const instrumentations = [
|
|
57
|
+
(0, auto_instrumentations_node_1.getNodeAutoInstrumentations)({
|
|
58
|
+
'@opentelemetry/instrumentation-http': {
|
|
59
|
+
requestHook: session_recorder_node_1.SessionRecorderHttpInstrumentationHooksNode.requestHook({
|
|
60
|
+
maskHeadersList: ['X-Api-Key'],
|
|
61
|
+
maxPayloadSizeBytes: 5000,
|
|
62
|
+
schemifyDocSpanPayload: false,
|
|
63
|
+
isMaskBodyEnabled: false,
|
|
64
|
+
}),
|
|
65
|
+
responseHook: session_recorder_node_1.SessionRecorderHttpInstrumentationHooksNode.responseHook({
|
|
66
|
+
maskHeadersList: ['X-Api-Key'],
|
|
67
|
+
maxPayloadSizeBytes: 5000,
|
|
68
|
+
schemifyDocSpanPayload: false,
|
|
69
|
+
isMaskBodyEnabled: false,
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
];
|
|
74
|
+
const getResource = () => {
|
|
75
|
+
const resourceWithAttributes = (0, resources_1.resourceFromAttributes)({
|
|
76
|
+
[semantic_conventions_1.ATTR_SERVICE_NAME]: config_1.COMPONENT_NAME,
|
|
77
|
+
[semantic_conventions_1.ATTR_SERVICE_VERSION]: config_1.COMPONENT_VERSION,
|
|
78
|
+
[semantic_conventions_1.SEMRESATTRS_HOST_NAME]: (0, os_1.hostname)(),
|
|
79
|
+
[semantic_conventions_1.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: config_1.ENVIRONMENT,
|
|
80
|
+
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.version,
|
|
81
|
+
[semantic_conventions_1.SEMRESATTRS_PROCESS_PID]: process.pid,
|
|
82
|
+
});
|
|
83
|
+
const detectedResources = (0, resources_1.detectResources)({ detectors: (0, auto_instrumentations_node_1.getResourceDetectors)() });
|
|
84
|
+
const resource = resourceWithAttributes.merge(detectedResources);
|
|
85
|
+
return resource;
|
|
86
|
+
};
|
|
87
|
+
exports.idGenerator = new session_recorder_node_1.SessionRecorderIdGenerator();
|
|
88
|
+
const opentelemetry = () => {
|
|
89
|
+
// const traceExporter = new OTLPTraceExporter({
|
|
90
|
+
// url: OTLP_TRACES_ENDPOINT,
|
|
91
|
+
// headers: {
|
|
92
|
+
// Authorization: MULTIPLAYER_OTLP_KEY
|
|
93
|
+
// },
|
|
94
|
+
// })
|
|
95
|
+
const traceExporter = new session_recorder_node_1.SessionRecorderHttpTraceExporter({
|
|
96
|
+
apiKey: config_1.MULTIPLAYER_OTLP_KEY,
|
|
97
|
+
url: config_1.OTLP_TRACES_ENDPOINT,
|
|
98
|
+
});
|
|
99
|
+
const resource = getResource();
|
|
100
|
+
const provider = new sdk_node_1.node.NodeTracerProvider({
|
|
101
|
+
resource,
|
|
102
|
+
spanProcessors: [
|
|
103
|
+
new sdk_trace_base_1.BatchSpanProcessor(traceExporter),
|
|
104
|
+
],
|
|
105
|
+
sampler: new sdk_trace_base_1.ParentBasedSampler({
|
|
106
|
+
root: new session_recorder_node_1.SessionRecorderTraceIdRatioBasedSampler(config_1.MULTIPLAYER_OTLP_SPAN_RATIO),
|
|
107
|
+
}),
|
|
108
|
+
idGenerator: exports.idGenerator,
|
|
109
|
+
});
|
|
110
|
+
// const logExporter = new OTLPLogExporter({
|
|
111
|
+
// url: OTLP_LOGS_ENDPOINT,
|
|
112
|
+
// headers: {
|
|
113
|
+
// Authorization: MULTIPLAYER_OTLP_KEY
|
|
114
|
+
// },
|
|
115
|
+
// })
|
|
116
|
+
const logExporter = new session_recorder_node_1.SessionRecorderHttpLogsExporter({
|
|
117
|
+
apiKey: config_1.MULTIPLAYER_OTLP_KEY,
|
|
118
|
+
url: config_1.OTLP_LOGS_ENDPOINT,
|
|
119
|
+
});
|
|
120
|
+
const logRecordProcessor = new sdk_logs_1.BatchLogRecordProcessor(logExporter);
|
|
121
|
+
const loggerProvider = new sdk_logs_1.LoggerProvider({
|
|
122
|
+
resource,
|
|
123
|
+
processors: [logRecordProcessor],
|
|
124
|
+
});
|
|
125
|
+
apiLogs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
126
|
+
provider.register();
|
|
127
|
+
api_1.default.trace.setGlobalTracerProvider(provider);
|
|
128
|
+
api_1.default.propagation.setGlobalPropagator(new core_1.W3CTraceContextPropagator());
|
|
129
|
+
const sdk = new sdk_node_1.NodeSDK({
|
|
130
|
+
instrumentations,
|
|
131
|
+
});
|
|
132
|
+
sdk.start();
|
|
133
|
+
};
|
|
134
|
+
opentelemetry();
|
|
135
|
+
//# sourceMappingURL=opentelemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opentelemetry.js","sourceRoot":"","sources":["../src/opentelemetry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,sDAAuD;AACvD,kEAGsC;AACtC,0FAGkD;AAClD,wDAGiC;AACjC,8EAO4C;AAC5C,6DAAoC;AACpC,8EAA8E;AAC9E,8CAA+D;AAC/D,kFAM+C;AAC/C,sDAAiF;AACjF,iEAAkD;AAClD,2EAA2E;AAE3E,qCAQiB;AAEjB,uDAAuD;AACvD,wFAAwF;AACxF,MAAM,gBAAgB,GAAG;IACvB,IAAA,wDAA2B,EAAC;QAC1B,qCAAqC,EAAE;YACrC,WAAW,EAAE,mEAA2C,CAAC,WAAW,CAAC;gBACnE,eAAe,EAAE,CAAC,WAAW,CAAC;gBAC9B,mBAAmB,EAAE,IAAI;gBACzB,sBAAsB,EAAE,KAAK;gBAC7B,iBAAiB,EAAE,KAAK;aACzB,CAAC;YACF,YAAY,EAAE,mEAA2C,CAAC,YAAY,CAAC;gBACrE,eAAe,EAAE,CAAC,WAAW,CAAC;gBAC9B,mBAAmB,EAAE,IAAI;gBACzB,sBAAsB,EAAE,KAAK;gBAC7B,iBAAiB,EAAE,KAAK;aACzB,CAAC;SACH;KACF,CAAC;CACH,CAAA;AAED,MAAM,WAAW,GAAG,GAAG,EAAE;IACvB,MAAM,sBAAsB,GAAG,IAAA,kCAAsB,EAAC;QACpD,CAAC,wCAAiB,CAAC,EAAE,uBAAc;QACnC,CAAC,2CAAoB,CAAC,EAAE,0BAAiB;QACzC,CAAC,4CAAqB,CAAC,EAAE,IAAA,aAAQ,GAAE;QACnC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,CAAA;IAEnE,MAAM,cAAc,GAAG,IAAI,yBAAc,CAAC;QACxC,QAAQ;QACR,UAAU,EAAE,CAAC,kBAAkB,CAAC;KACjC,CAAC,CAAA;IAEF,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAA;IAEpD,QAAQ,CAAC,QAAQ,EAAE,CAAA;IACnB,aAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAA;IAC3C,aAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,gCAAyB,EAAE,CAAC,CAAA;IAEpE,MAAM,GAAG,GAAG,IAAI,kBAAO,CAAC;QACtB,gBAAgB;KACjB,CAAC,CAAA;IAEF,GAAG,CAAC,KAAK,EAAE,CAAA;AACb,CAAC,CAAA;AAED,aAAa,EAAE,CAAA"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint": "eslint src/**/*.ts --config ../../.eslintrc"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@multiplayer-app/session-recorder-common": "1.3.
|
|
33
|
+
"@multiplayer-app/session-recorder-common": "1.3.37",
|
|
34
34
|
"@opentelemetry/api": "1.9.0",
|
|
35
35
|
"@opentelemetry/api-logs": "0.203.0",
|
|
36
36
|
"@opentelemetry/auto-instrumentations-node": "0.62.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/jest": "29.5.4",
|
|
50
50
|
"@types/node": "20.5.7",
|
|
51
51
|
"@types/restify-errors": "4.3.5",
|
|
52
|
-
"eslint": "
|
|
52
|
+
"eslint": "10.1.0",
|
|
53
53
|
"ts-node": "10.9.1",
|
|
54
54
|
"typescript": "5.7.3"
|
|
55
55
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM,KAAW,CAAA;AAYvB,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const express_1 = __importDefault(require("express"));
|
|
7
|
+
const { Router } = express_1.default;
|
|
8
|
+
const router = Router();
|
|
9
|
+
const health = async (req, res, next) => {
|
|
10
|
+
try {
|
|
11
|
+
return res.status(200).json({});
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
return next(err);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
router.route('/').get(health);
|
|
18
|
+
exports.default = router;
|
|
19
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;AAAA,sDAIgB;AAEhB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAO,CAAA;AAC1B,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;AAEvB,MAAM,MAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IACvE,IAAI,CAAC;QACH,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AAE7B,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const NODE_ENV: string;
|
|
2
|
+
export declare const isProduction: boolean;
|
|
3
|
+
export declare const PORT: number;
|
|
4
|
+
export declare const API_PREFIX: string;
|
|
5
|
+
export declare const LOG_LEVEL: string;
|
|
6
|
+
export declare const COMPONENT_NAME: string;
|
|
7
|
+
export declare const COMPONENT_VERSION: string;
|
|
8
|
+
export declare const ENVIRONMENT: string;
|
|
9
|
+
export declare const MULTIPLAYER_OTLP_KEY: string;
|
|
10
|
+
export declare const OTLP_TRACES_ENDPOINT: string;
|
|
11
|
+
export declare const OTLP_LOGS_ENDPOINT: string;
|
|
12
|
+
export declare const MULTIPLAYER_OTLP_SPAN_RATIO: number;
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAwC,CAAA;AAC7D,eAAO,MAAM,YAAY,SAA4B,CAAA;AAErD,eAAO,MAAM,IAAI,QAAmC,CAAA;AACpD,eAAO,MAAM,UAAU,QAAsC,CAAA;AAE7D,eAAO,MAAM,SAAS,QAA6D,CAAA;AAEnF,eAAO,MAAM,cAAc,QAAqG,CAAA;AAChI,eAAO,MAAM,iBAAiB,QAA6C,CAAA;AAC3E,eAAO,MAAM,WAAW,QAAuC,CAAA;AAE/D,eAAO,MAAM,oBAAoB,EAAuC,MAAM,CAAA;AAM9E,eAAO,MAAM,oBAAoB,QAA8E,CAAA;AAC/G,eAAO,MAAM,kBAAkB,QAA0E,CAAA;AAEzG,eAAO,MAAM,2BAA2B,QAEhC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MULTIPLAYER_OTLP_SPAN_RATIO = exports.OTLP_LOGS_ENDPOINT = exports.OTLP_TRACES_ENDPOINT = exports.MULTIPLAYER_OTLP_KEY = exports.ENVIRONMENT = exports.COMPONENT_VERSION = exports.COMPONENT_NAME = exports.LOG_LEVEL = exports.API_PREFIX = exports.PORT = exports.isProduction = exports.NODE_ENV = void 0;
|
|
5
|
+
exports.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
6
|
+
exports.isProduction = exports.NODE_ENV === 'production';
|
|
7
|
+
exports.PORT = Number(process.env.PORT || 3000);
|
|
8
|
+
exports.API_PREFIX = process.env.API_PREFIX || '/v1/api';
|
|
9
|
+
exports.LOG_LEVEL = process.env.LOG_LEVEL || (exports.isProduction ? 'info' : 'debug');
|
|
10
|
+
exports.COMPONENT_NAME = ((_a = process.env.npm_package_name) === null || _a === void 0 ? void 0 : _a.split('/').pop()) || process.env.SERVICE_NAME || 'timegate';
|
|
11
|
+
exports.COMPONENT_VERSION = process.env.npm_package_version || '0.0.1';
|
|
12
|
+
exports.ENVIRONMENT = process.env.ENVIRONMENT || 'staging';
|
|
13
|
+
exports.MULTIPLAYER_OTLP_KEY = process.env.MULTIPLAYER_OTLP_KEY;
|
|
14
|
+
if (!exports.MULTIPLAYER_OTLP_KEY) {
|
|
15
|
+
throw new Error('MULTIPLAYER_OTLP_KEY is not set');
|
|
16
|
+
}
|
|
17
|
+
exports.OTLP_TRACES_ENDPOINT = process.env.OTLP_TRACES_ENDPOINT || 'https://api.multiplayer.app/v1/traces';
|
|
18
|
+
exports.OTLP_LOGS_ENDPOINT = process.env.OTLP_LOGS_ENDPOINT || 'https://api.multiplayer.app/v1/logs';
|
|
19
|
+
exports.MULTIPLAYER_OTLP_SPAN_RATIO = process.env.MULTIPLAYER_OTLP_SPAN_RATIO
|
|
20
|
+
? Number(process.env.MULTIPLAYER_OTLP_SPAN_RATIO)
|
|
21
|
+
: 0.01;
|
|
22
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;AAAa,QAAA,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAA;AAChD,QAAA,YAA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":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
require("dotenv/config");
|
|
7
|
+
require("./opentelemetry");
|
|
8
|
+
const http_1 = __importDefault(require("http"));
|
|
9
|
+
const cors_1 = __importDefault(require("cors"));
|
|
10
|
+
const body_parser_1 = __importDefault(require("body-parser"));
|
|
11
|
+
const express_1 = __importDefault(require("express"));
|
|
12
|
+
const config_1 = require("./config");
|
|
13
|
+
const api_1 = __importDefault(require("./api"));
|
|
14
|
+
const app = (0, express_1.default)();
|
|
15
|
+
app.use((0, cors_1.default)());
|
|
16
|
+
app.use(body_parser_1.default.urlencoded({ extended: true }));
|
|
17
|
+
app.use(body_parser_1.default.json());
|
|
18
|
+
app.use(config_1.API_PREFIX, api_1.default);
|
|
19
|
+
app.use((req, res, next) => {
|
|
20
|
+
res.status(404).send('Not found');
|
|
21
|
+
});
|
|
22
|
+
const httpServer = http_1.default.createServer(app);
|
|
23
|
+
const onReady = () => {
|
|
24
|
+
console.log(`🚀 Server ready at http://localhost:${config_1.PORT}`);
|
|
25
|
+
};
|
|
26
|
+
httpServer.listen(config_1.PORT, onReady);
|
|
27
|
+
const exitHandler = async (error) => {
|
|
28
|
+
if (error) {
|
|
29
|
+
console.log('Server exited with error', error);
|
|
30
|
+
}
|
|
31
|
+
process.removeListener('exit', exitHandler);
|
|
32
|
+
process.exit();
|
|
33
|
+
};
|
|
34
|
+
process.on('exit', exitHandler);
|
|
35
|
+
process.on('SIGINT', exitHandler);
|
|
36
|
+
process.on('SIGTERM', exitHandler);
|
|
37
|
+
process.on('uncaughtException', (err) => {
|
|
38
|
+
console.error('uncaughtException', err);
|
|
39
|
+
});
|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;IAC3C,OAAO,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC,CAAA;AAED,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC/B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;AACjC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;AAClC,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;IACpC,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opentelemetry.d.ts","sourceRoot":"","sources":["../src/opentelemetry.ts"],"names":[],"mappings":"AAkFA,eAAO,MAAM,WAAW,KAAmC,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.idGenerator = void 0;
|
|
40
|
+
const os_1 = require("os");
|
|
41
|
+
const sdk_node_1 = require("@opentelemetry/sdk-node");
|
|
42
|
+
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
43
|
+
const auto_instrumentations_node_1 = require("@opentelemetry/auto-instrumentations-node");
|
|
44
|
+
const resources_1 = require("@opentelemetry/resources");
|
|
45
|
+
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
46
|
+
const api_1 = __importDefault(require("@opentelemetry/api"));
|
|
47
|
+
// import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"
|
|
48
|
+
const core_1 = require("@opentelemetry/core");
|
|
49
|
+
const session_recorder_node_1 = require("@multiplayer-app/session-recorder-node");
|
|
50
|
+
const sdk_logs_1 = require("@opentelemetry/sdk-logs");
|
|
51
|
+
const apiLogs = __importStar(require("@opentelemetry/api-logs"));
|
|
52
|
+
// import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'
|
|
53
|
+
const config_1 = require("./config");
|
|
54
|
+
// NOTE: Update instrumentation configuration as needed
|
|
55
|
+
// For more see: https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node
|
|
56
|
+
const instrumentations = [
|
|
57
|
+
(0, auto_instrumentations_node_1.getNodeAutoInstrumentations)({
|
|
58
|
+
'@opentelemetry/instrumentation-http': {
|
|
59
|
+
requestHook: session_recorder_node_1.SessionRecorderHttpInstrumentationHooksNode.requestHook({
|
|
60
|
+
maskHeadersList: ['X-Api-Key'],
|
|
61
|
+
maxPayloadSizeBytes: 5000,
|
|
62
|
+
schemifyDocSpanPayload: false,
|
|
63
|
+
isMaskBodyEnabled: false,
|
|
64
|
+
}),
|
|
65
|
+
responseHook: session_recorder_node_1.SessionRecorderHttpInstrumentationHooksNode.responseHook({
|
|
66
|
+
maskHeadersList: ['X-Api-Key'],
|
|
67
|
+
maxPayloadSizeBytes: 5000,
|
|
68
|
+
schemifyDocSpanPayload: false,
|
|
69
|
+
isMaskBodyEnabled: false,
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
];
|
|
74
|
+
const getResource = () => {
|
|
75
|
+
const resourceWithAttributes = (0, resources_1.resourceFromAttributes)({
|
|
76
|
+
[semantic_conventions_1.ATTR_SERVICE_NAME]: config_1.COMPONENT_NAME,
|
|
77
|
+
[semantic_conventions_1.ATTR_SERVICE_VERSION]: config_1.COMPONENT_VERSION,
|
|
78
|
+
[semantic_conventions_1.SEMRESATTRS_HOST_NAME]: (0, os_1.hostname)(),
|
|
79
|
+
[semantic_conventions_1.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: config_1.ENVIRONMENT,
|
|
80
|
+
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.version,
|
|
81
|
+
[semantic_conventions_1.SEMRESATTRS_PROCESS_PID]: process.pid,
|
|
82
|
+
});
|
|
83
|
+
const detectedResources = (0, resources_1.detectResources)({ detectors: (0, auto_instrumentations_node_1.getResourceDetectors)() });
|
|
84
|
+
const resource = resourceWithAttributes.merge(detectedResources);
|
|
85
|
+
return resource;
|
|
86
|
+
};
|
|
87
|
+
exports.idGenerator = new session_recorder_node_1.SessionRecorderIdGenerator();
|
|
88
|
+
const opentelemetry = () => {
|
|
89
|
+
// const traceExporter = new OTLPTraceExporter({
|
|
90
|
+
// url: OTLP_TRACES_ENDPOINT,
|
|
91
|
+
// headers: {
|
|
92
|
+
// Authorization: MULTIPLAYER_OTLP_KEY
|
|
93
|
+
// },
|
|
94
|
+
// })
|
|
95
|
+
const traceExporter = new session_recorder_node_1.SessionRecorderHttpTraceExporter({
|
|
96
|
+
apiKey: config_1.MULTIPLAYER_OTLP_KEY,
|
|
97
|
+
url: config_1.OTLP_TRACES_ENDPOINT,
|
|
98
|
+
});
|
|
99
|
+
const resource = getResource();
|
|
100
|
+
const provider = new sdk_node_1.node.NodeTracerProvider({
|
|
101
|
+
resource,
|
|
102
|
+
spanProcessors: [
|
|
103
|
+
new sdk_trace_base_1.BatchSpanProcessor(traceExporter),
|
|
104
|
+
],
|
|
105
|
+
sampler: new sdk_trace_base_1.ParentBasedSampler({
|
|
106
|
+
root: new session_recorder_node_1.SessionRecorderTraceIdRatioBasedSampler(config_1.MULTIPLAYER_OTLP_SPAN_RATIO),
|
|
107
|
+
}),
|
|
108
|
+
idGenerator: exports.idGenerator,
|
|
109
|
+
});
|
|
110
|
+
// const logExporter = new OTLPLogExporter({
|
|
111
|
+
// url: OTLP_LOGS_ENDPOINT,
|
|
112
|
+
// headers: {
|
|
113
|
+
// Authorization: MULTIPLAYER_OTLP_KEY
|
|
114
|
+
// },
|
|
115
|
+
// })
|
|
116
|
+
const logExporter = new session_recorder_node_1.SessionRecorderHttpLogsExporter({
|
|
117
|
+
apiKey: config_1.MULTIPLAYER_OTLP_KEY,
|
|
118
|
+
url: config_1.OTLP_LOGS_ENDPOINT,
|
|
119
|
+
});
|
|
120
|
+
const logRecordProcessor = new sdk_logs_1.BatchLogRecordProcessor(logExporter);
|
|
121
|
+
const loggerProvider = new sdk_logs_1.LoggerProvider({
|
|
122
|
+
resource,
|
|
123
|
+
processors: [logRecordProcessor],
|
|
124
|
+
});
|
|
125
|
+
apiLogs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
126
|
+
provider.register();
|
|
127
|
+
api_1.default.trace.setGlobalTracerProvider(provider);
|
|
128
|
+
api_1.default.propagation.setGlobalPropagator(new core_1.W3CTraceContextPropagator());
|
|
129
|
+
const sdk = new sdk_node_1.NodeSDK({
|
|
130
|
+
instrumentations,
|
|
131
|
+
});
|
|
132
|
+
sdk.start();
|
|
133
|
+
};
|
|
134
|
+
opentelemetry();
|
|
135
|
+
//# sourceMappingURL=opentelemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opentelemetry.js","sourceRoot":"","sources":["../src/opentelemetry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,sDAAuD;AACvD,kEAGsC;AACtC,0FAGkD;AAClD,wDAGiC;AACjC,8EAO4C;AAC5C,6DAAoC;AACpC,8EAA8E;AAC9E,8CAA+D;AAC/D,kFAM+C;AAC/C,sDAAiF;AACjF,iEAAkD;AAClD,2EAA2E;AAE3E,qCAQiB;AAEjB,uDAAuD;AACvD,wFAAwF;AACxF,MAAM,gBAAgB,GAAG;IACvB,IAAA,wDAA2B,EAAC;QAC1B,qCAAqC,EAAE;YACrC,WAAW,EAAE,mEAA2C,CAAC,WAAW,CAAC;gBACnE,eAAe,EAAE,CAAC,WAAW,CAAC;gBAC9B,mBAAmB,EAAE,IAAI;gBACzB,sBAAsB,EAAE,KAAK;gBAC7B,iBAAiB,EAAE,KAAK;aACzB,CAAC;YACF,YAAY,EAAE,mEAA2C,CAAC,YAAY,CAAC;gBACrE,eAAe,EAAE,CAAC,WAAW,CAAC;gBAC9B,mBAAmB,EAAE,IAAI;gBACzB,sBAAsB,EAAE,KAAK;gBAC7B,iBAAiB,EAAE,KA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C,CAAA;IAEF,4CAA4C;IAC5C,6BAA6B;IAC7B,eAAe;IACf,0CAA0C;IAC1C,OAAO;IACP,KAAK;IACL,MAAM,WAAW,GAAG,IAAI,uDAA+B,CAAC;QACtD,MAAM,EAAE,6BAAoB;QAC5B,GAAG,EAAE,2BAAkB;KACxB,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,IAAI,kCAAuB,CAAC,WAAW,CAAC,CAAA;IAEnE,MAAM,cAAc,GAAG,IAAI,yBAAc,CAAC;QACxC,QAAQ;QACR,UAAU,EAAE,CAAC,kBAAkB,CAAC;KACjC,CAAC,CAAA;IAEF,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAA;IAEpD,QAAQ,CAAC,QAAQ,EAAE,CAAA;IACnB,aAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAA;IAC3C,aAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,gCAAyB,EAAE,CAAC,CAAA;IAEpE,MAAM,GAAG,GAAG,IAAI,kBAAO,CAAC;QACtB,gBAAgB;KACjB,CAAC,CAAA;IAEF,GAAG,CAAC,KAAK,EAAE,CAAA;AACb,CAAC,CAAA;AAED,aAAa,EAAE,CAAA"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"author": "Multiplayer",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@multiplayer-app/session-recorder-node": "1.3.
|
|
20
|
+
"@multiplayer-app/session-recorder-node": "1.3.37",
|
|
21
21
|
"@opentelemetry/api": "1.9.0",
|
|
22
22
|
"@opentelemetry/api-logs": "0.203.0",
|
|
23
23
|
"@opentelemetry/auto-instrumentations-node": "0.62.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/express": "4.17.17",
|
|
41
41
|
"@types/jest": "29.5.4",
|
|
42
42
|
"@types/node": "20.5.7",
|
|
43
|
-
"eslint": "
|
|
43
|
+
"eslint": "10.1.0",
|
|
44
44
|
"nodemon": "3.1.9",
|
|
45
45
|
"ts-node": "10.9.1",
|
|
46
46
|
"typescript": "5.7.3"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplayer-app/session-recorder-node",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.37",
|
|
4
4
|
"description": "Multiplayer Fullstack Session Recorder for Node.js",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Multiplayer Software, Inc.",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"fullstack session recorder"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"lint": "eslint src/**/*.ts",
|
|
32
|
+
"lint": "eslint src/**/*.ts --config eslint.config.js",
|
|
33
33
|
"preversion": "npm run lint",
|
|
34
34
|
"postversion:skip": "git push && git push --tags",
|
|
35
35
|
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc --build tsconfig.json",
|
|
36
36
|
"prepublishOnly": "npm run build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@multiplayer-app/session-recorder-common": "1.3.
|
|
39
|
+
"@multiplayer-app/session-recorder-common": "1.3.37",
|
|
40
40
|
"@opentelemetry/api": "^1.9.0",
|
|
41
41
|
"@opentelemetry/core": "^2.0.1",
|
|
42
42
|
"@opentelemetry/otlp-exporter-base": "^0.203.0",
|