@astroscope/opentelemetry 0.2.5 → 0.3.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/index.js +1 -5
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -20,7 +20,6 @@ function opentelemetry(options = {}) {
|
|
|
20
20
|
const fetchConfig = options.instrumentations?.fetch ?? { enabled: true };
|
|
21
21
|
const httpExclude = httpConfig.exclude ?? (httpConfig.enabled ? RECOMMENDED_EXCLUDES : []);
|
|
22
22
|
let isBuild = false;
|
|
23
|
-
let isSSR = false;
|
|
24
23
|
return {
|
|
25
24
|
name: "@astroscope/opentelemetry",
|
|
26
25
|
hooks: {
|
|
@@ -63,11 +62,8 @@ function opentelemetry(options = {}) {
|
|
|
63
62
|
}
|
|
64
63
|
});
|
|
65
64
|
},
|
|
66
|
-
configResolved(config) {
|
|
67
|
-
isSSR = !!config.build?.ssr;
|
|
68
|
-
},
|
|
69
65
|
writeBundle(outputOptions) {
|
|
70
|
-
if (
|
|
66
|
+
if (this.environment.name !== "ssr") return;
|
|
71
67
|
const outDir = outputOptions.dir;
|
|
72
68
|
if (!outDir) return;
|
|
73
69
|
const entryPath = path.join(outDir, "entry.mjs");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astroscope/opentelemetry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "OpenTelemetry for Astro — tracing, metrics, and component instrumentation that works in dev mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsup src/index.ts src/middleware-entrypoint.ts --format esm --dts --external virtual:@astroscope/opentelemetry/config",
|
|
52
52
|
"typecheck": "tsc --noEmit",
|
|
53
|
-
"lint": "eslint
|
|
54
|
-
"lint:fix": "eslint
|
|
53
|
+
"lint": "eslint src",
|
|
54
|
+
"lint:fix": "eslint src --fix"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@opentelemetry/api": "^1.9.0",
|
|
58
|
-
"@opentelemetry/core": "^2.
|
|
59
|
-
"astro": "^
|
|
58
|
+
"@opentelemetry/core": "^2.6.0",
|
|
59
|
+
"astro": "^6.0.2",
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"typescript": "^5.9.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@astroscope/excludes": "^0.
|
|
64
|
+
"@astroscope/excludes": "^0.3.0",
|
|
65
65
|
"@opentelemetry/api": "^1.0.0",
|
|
66
66
|
"@opentelemetry/core": "^2.0.0",
|
|
67
|
-
"astro": "^
|
|
67
|
+
"astro": "^6.0.0"
|
|
68
68
|
}
|
|
69
69
|
}
|