Files
sweet/deno.json
T
Luca Casonato 65d61bd1d5 feat: add open telemetry instrumentation (#2786)
This commit adds some useful automatic instrumentation for when users
are using `--unstable-otel`:

- Fresh renames the span for incoming HTTP requests to `$METHOD $ROUTE`
and the `http.route` attribute is added.
- Fresh creates a span around FS route handlers, showing whether they
returned a response or data.
- Fresh creates a span around async components, showing how long they
took to execute.
- Fresh adds a span around preact rendering, showing how long rendering
takes.
- Fresh adds a span around static file serving, showing how long it took
and whether there were requests without a cache bust key.

We can improve this in the future with more telemetry, such as metrics.
2024-12-10 15:03:50 +01:00

83 lines
2.8 KiB
JSON

{
"workspace": [
"./examples",
"./init",
"./plugin-tailwindcss",
"./update",
"./www"
],
"name": "@fresh/core",
"version": "2.0.0-alpha.25",
"license": "MIT",
"exports": {
".": "./src/mod.ts",
"./runtime": "./src/runtime/shared.ts",
"./dev": "./src/dev/mod.ts",
"./compat": "./src/compat/mod.ts"
},
"tasks": {
"test": "deno test -A --parallel src/ init/ update/ && deno test -A tests/ www/main_test.ts",
"fixture": "deno run -A --watch=static/,routes/ tests/fixture/dev.ts",
"www": "deno task --cwd=www start",
"build-www": "deno task --cwd=www build",
"screenshot": "deno run -A www/utils/screenshot.ts",
"check:types": "deno check src/**/*.ts src/**/*.tsx tests/**/*.ts tests/**/*.tsx update/**/*.ts plugin-tailwindcss/**/*.ts init/**/*.ts",
"ok": "deno fmt --check && deno lint && deno task check:types && deno task test",
"test:www": "deno test -A www/main_test.*",
"release": "deno run -A tools/release.ts"
},
"exclude": ["**/_fresh/*", "**/tmp/*", "*/tests_OLD/**"],
"publish": {
"include": [
"src/**",
"deno.json",
"README.md",
"LICENSE",
"www/static/fresh-badge.svg",
"www/static/fresh-badge-dark.svg",
"*.todo"
],
"exclude": ["**/*_test.*", "src/__OLD/**", "*.todo"]
},
"imports": {
"fresh": "jsr:@fresh/core@^2.0.0-alpha.25",
"preact": "npm:preact@^10.25.1",
"preact-render-to-string": "npm:preact-render-to-string@^6.5.11",
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.11.0",
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
"@preact/signals": "npm:@preact/signals@^1.2.3",
"esbuild": "npm:esbuild@0.23.1",
"esbuild-wasm": "npm:esbuild-wasm@0.23.1",
"@std/crypto": "jsr:@std/crypto@1",
"@std/datetime": "jsr:@std/datetime@^0.225.2",
"@std/encoding": "jsr:@std/encoding@1",
"@std/fmt": "jsr:@std/fmt@1",
"@std/fs": "jsr:@std/fs@1",
"@std/html": "jsr:@std/html@1",
"@std/jsonc": "jsr:@std/jsonc@1",
"@std/media-types": "jsr:@std/media-types@1",
"@std/path": "jsr:@std/path@1",
"@std/semver": "jsr:@std/semver@1",
"@std/streams": "jsr:@std/streams@1",
"@astral/astral": "jsr:@astral/astral@^0.4.6",
"@marvinh-test/fresh-island": "jsr:@marvinh-test/fresh-island@^0.0.1",
"linkedom": "npm:linkedom@^0.16.11",
"@std/async": "jsr:@std/async@1",
"@std/expect": "jsr:@std/expect@1"
},
"compilerOptions": {
"lib": ["dom", "dom.asynciterable", "deno.ns", "deno.unstable"],
"jsx": "precompile",
"jsxImportSource": "preact",
"jsxPrecompileSkipElements": ["a", "img", "source", "body", "html", "head"]
},
"lint": {
"rules": {
"exclude": ["no-window"],
"include": ["no-console"]
}
}
}