@obtrace/browser 1.0.1 → 2.0.1
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/auto.js
CHANGED
|
@@ -45,14 +45,10 @@ function readEnvConfig() {
|
|
|
45
45
|
let appId;
|
|
46
46
|
let env;
|
|
47
47
|
for (const p of prefixes) {
|
|
48
|
-
apiKey = apiKey || resolveEnvVar(`${p}OBTRACE_API_KEY`);
|
|
49
|
-
ingestBaseUrl = ingestBaseUrl || resolveEnvVar(`${p}OBTRACE_INGEST_BASE_URL`);
|
|
48
|
+
apiKey = apiKey || resolveEnvVar(`${p}OBTRACE_PUBLIC_KEY`) || resolveEnvVar(`${p}OBTRACE_API_KEY`);
|
|
50
49
|
serviceName = serviceName || resolveEnvVar(`${p}OBTRACE_SERVICE_NAME`);
|
|
51
|
-
appId = appId || resolveEnvVar(`${p}OBTRACE_APP_ID`);
|
|
52
|
-
env = env || resolveEnvVar(`${p}OBTRACE_ENV`);
|
|
53
50
|
}
|
|
54
|
-
|
|
55
|
-
return { apiKey, ingestBaseUrl, serviceName, appId, env };
|
|
51
|
+
return { apiKey, serviceName };
|
|
56
52
|
}
|
|
57
53
|
function merge(...sources) {
|
|
58
54
|
const merged = {};
|
|
@@ -116,7 +112,7 @@ function autoInit() {
|
|
|
116
112
|
return;
|
|
117
113
|
}
|
|
118
114
|
console.warn("[obtrace] No configuration found. Provide config via window.__OBTRACE_CONFIG__, " +
|
|
119
|
-
'<meta name="obtrace-api-key">, or
|
|
115
|
+
'<meta name="obtrace-api-key">, or VITE_OBTRACE_PUBLIC_KEY env var. ' +
|
|
120
116
|
"Deferring initialization until config appears.");
|
|
121
117
|
setupDeferredInit();
|
|
122
118
|
}
|
package/dist/browser/index.js
CHANGED
|
@@ -192,7 +192,7 @@ export function initBrowserSDK(config) {
|
|
|
192
192
|
},
|
|
193
193
|
body: JSON.stringify({
|
|
194
194
|
sdk: "@obtrace/browser",
|
|
195
|
-
sdk_version: "
|
|
195
|
+
sdk_version: "2.0.0",
|
|
196
196
|
service_name: config.serviceName,
|
|
197
197
|
service_version: config.serviceVersion ?? "",
|
|
198
198
|
runtime: "browser",
|
|
@@ -28560,7 +28560,7 @@ function initBrowserSDK(config) {
|
|
|
28560
28560
|
},
|
|
28561
28561
|
body: JSON.stringify({
|
|
28562
28562
|
sdk: "@obtrace/browser",
|
|
28563
|
-
sdk_version: "
|
|
28563
|
+
sdk_version: "2.0.0",
|
|
28564
28564
|
service_name: config.serviceName,
|
|
28565
28565
|
service_version: config.serviceVersion ?? "",
|
|
28566
28566
|
runtime: "browser",
|