@clickhouse/clickstack-node 0.0.0-stage → 1.0.0-rc.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.
@@ -0,0 +1,13 @@
1
+ // src/semconv.ts
2
+ /** `http.request.body.size`: semantic-conventions v1.43.0, development. */
3
+ const ATTR_HTTP_REQUEST_BODY_SIZE = "http.request.body.size";
4
+ /** `http.response.body.size`: semantic-conventions v1.43.0, development. */
5
+ const ATTR_HTTP_RESPONSE_BODY_SIZE = "http.response.body.size";
6
+ /**
7
+ * `http.request.body.content`: development. Added on semantic-conventions `main`
8
+ * by PR #3521 (commit bcd7e291081f, 2026-08-14); not in a release as of v1.44.0.
9
+ */
10
+ const ATTR_HTTP_REQUEST_BODY_CONTENT = "http.request.body.content";
11
+ /** `http.response.body.content`: same source as {@link ATTR_HTTP_REQUEST_BODY_CONTENT}. */
12
+ const ATTR_HTTP_RESPONSE_BODY_CONTENT = "http.response.body.content";
13
+ export { ATTR_HTTP_REQUEST_BODY_CONTENT, ATTR_HTTP_REQUEST_BODY_SIZE, ATTR_HTTP_RESPONSE_BODY_CONTENT, ATTR_HTTP_RESPONSE_BODY_SIZE };
package/dist/state.cjs ADDED
@@ -0,0 +1,12 @@
1
+ // src/state.ts
2
+ const KEY = Symbol.for("@clickhouse/clickstack-node");
3
+ /**
4
+ * Returns the per-thread shared state, creating it on first use.
5
+ *
6
+ * @returns The state stored on `globalThis`.
7
+ */
8
+ function getState() {
9
+ const slot = globalThis;
10
+ return slot[KEY] ??= {};
11
+ }
12
+ exports.getState = getState;
package/dist/state.mjs ADDED
@@ -0,0 +1,12 @@
1
+ // src/state.ts
2
+ const KEY = Symbol.for("@clickhouse/clickstack-node");
3
+ /**
4
+ * Returns the per-thread shared state, creating it on first use.
5
+ *
6
+ * @returns The state stored on `globalThis`.
7
+ */
8
+ function getState() {
9
+ const slot = globalThis;
10
+ return slot[KEY] ??= {};
11
+ }
12
+ export { getState };
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ /** The package version, replaced at build time by the tsdown and Vitest `define` option. */
3
+ const VERSION = "1.0.0-rc.1";
4
+ exports.VERSION = VERSION;
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ /** The package version, replaced at build time by the tsdown and Vitest `define` option. */
3
+ const VERSION = "1.0.0-rc.1";
4
+ export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,116 @@
1
1
  {
2
2
  "name": "@clickhouse/clickstack-node",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-rc.1",
4
+ "description": "OpenTelemetry Node.js for ClickHouse Observability",
5
+ "keywords": [
6
+ "opentelemetry",
7
+ "otel",
8
+ "clickstack",
9
+ "clickhouse",
10
+ "tracing",
11
+ "observability",
12
+ "distro"
13
+ ],
14
+ "homepage": "https://github.com/ClickHouse/clickstack-node#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/ClickHouse/clickstack-node/issues"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/ClickHouse/clickstack-node.git"
22
+ },
23
+ "type": "module",
24
+ "exports": {
25
+ ".": {
26
+ "import": {
27
+ "types": "./dist/index.d.mts",
28
+ "default": "./dist/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/index.d.cts",
32
+ "default": "./dist/index.cjs"
33
+ }
34
+ },
35
+ "./register": {
36
+ "import": {
37
+ "types": "./dist/register.d.mts",
38
+ "default": "./dist/register.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/register.d.cts",
42
+ "default": "./dist/register.cjs"
43
+ }
44
+ },
45
+ "./package.json": "./package.json"
46
+ },
47
+ "main": "./dist/index.cjs",
48
+ "types": "./dist/index.d.cts",
49
+ "files": [
50
+ "dist"
51
+ ],
52
+ "sideEffects": [
53
+ "./dist/register.mjs",
54
+ "./dist/register.cjs"
55
+ ],
56
+ "engines": {
57
+ "node": ">=22.15.0"
58
+ },
59
+ "scripts": {
60
+ "build": "tsdown",
61
+ "typecheck": "tsc -p tsconfig.json",
62
+ "lint": "eslint --max-warnings 0 .",
63
+ "format": "prettier --write .",
64
+ "format:check": "prettier --check .",
65
+ "test": "vitest run --project unit --coverage",
66
+ "test:e2e": "vitest run --project e2e",
67
+ "spell": "cspell lint --no-progress --dot --gitignore \"**\"",
68
+ "pack:check": "node -e \"require('node:fs').mkdirSync('pack', { recursive: true })\" && npm pack --pack-destination pack --silent && publint --strict pack/*.tgz && attw --profile node16 pack/*.tgz",
69
+ "check": "npm run spell && npm run format:check && npm run lint && npm run typecheck && npm run test && npm run build && npm run pack:check && npm run test:e2e"
70
+ },
71
+ "dependencies": {
72
+ "@opentelemetry/api-logs": "^0.223.0",
73
+ "@opentelemetry/auto-instrumentations-node": "^0.81.0",
74
+ "@opentelemetry/core": "^2.12.0",
75
+ "@opentelemetry/instrumentation": "^0.223.0",
76
+ "@opentelemetry/instrumentation-console": "^0.5.0",
77
+ "@opentelemetry/resources": "^2.12.0",
78
+ "@opentelemetry/sdk-node": "^0.223.0",
79
+ "@opentelemetry/semantic-conventions": "^1.43.0",
80
+ "import-in-the-middle": "^3.5.2"
81
+ },
82
+ "peerDependencies": {
83
+ "@opentelemetry/api": ">=1.9.1 <1.10.0"
84
+ },
85
+ "devDependencies": {
86
+ "@arethetypeswrong/cli": "0.18.5",
87
+ "@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
88
+ "@eslint/js": "10.0.1",
89
+ "@opentelemetry/api": "1.9.1",
90
+ "@types/node": "22.20.5",
91
+ "@vitest/coverage-v8": "5.0.5",
92
+ "cspell": "10.4.0",
93
+ "eslint": "10.13.0",
94
+ "eslint-plugin-tsdoc": "0.5.4",
95
+ "globals": "17.13.0",
96
+ "prettier": "3.9.10",
97
+ "publint": "0.3.25",
98
+ "tsdown": "0.23.1",
99
+ "typescript": "6.0.3",
100
+ "typescript-eslint": "8.72.0",
101
+ "vitest": "5.0.5"
102
+ },
103
+ "devEngines": {
104
+ "runtime": {
105
+ "name": "node",
106
+ "version": "^24.11.0 || >=26.0.0",
107
+ "onFail": "error"
108
+ },
109
+ "packageManager": {
110
+ "name": "npm",
111
+ "version": ">=11.11.0 <12",
112
+ "onFail": "error"
113
+ }
114
+ },
115
+ "packageManager": "npm@11.19.1"
116
+ }