@xynolog/observability 0.8.0 → 0.8.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/README.md +26 -23
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -4,27 +4,18 @@
|
|
|
4
4
|
[](https://app.codecov.io/gh/xynolog/sdk/components)
|
|
5
5
|
[](https://www.npmjs.com/package/@xynolog/observability)
|
|
6
6
|
[](https://www.npmjs.com/package/@xynolog/observability)
|
|
7
|
-
[](https://github.com/xynolog/sdk/blob/
|
|
7
|
+
[](https://github.com/xynolog/sdk/blob/v0.8.1/LICENSE)
|
|
8
8
|
|
|
9
9
|
Tracing and metrics for Xynolog's TypeScript transport and for a Node program built on it, on [OpenTelemetry](https://opentelemetry.io). It is off unless a process is given somewhere to export to: with no endpoint configured, every function here does nothing.
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
- **[`@xynolog/http-transport`](../http-transport/README.md)** runs each request in a span and carries the trace across the wire. That is how this package comes to be in the Browser's bundle.
|
|
14
|
-
- **[`@xynolog/sdk`](../sdk/README.md)** carries the trace of a job from the request that made it to the worker that claims it.
|
|
15
|
-
|
|
16
|
-
No Xynolog service is a Node process. The gateway, the dispatcher and the Archivist are Rust and have a crate of their own for this; the Python services have `xynolog_service`.
|
|
17
|
-
|
|
18
|
-
**Building an application?** You do not need this package. The SDK's transport reports through OpenTelemetry's global API, so an application that registers a tracer of its own sees the transport's spans in its traces.
|
|
19
|
-
|
|
20
|
-
## What is in it
|
|
11
|
+
## Install
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| `@xynolog/observability/node` | `initObservabilityNode` and `shutdownObservabilityNode`: the tracer, the meter, the exporter and the context manager of a Node process |
|
|
13
|
+
```bash
|
|
14
|
+
npm install @xynolog/observability
|
|
15
|
+
```
|
|
26
16
|
|
|
27
|
-
|
|
17
|
+
Below 1.0 the minor number is the break, and the caret range npm writes into `package.json`
|
|
18
|
+
takes the releases up to the next minor and no further.
|
|
28
19
|
|
|
29
20
|
## Example
|
|
30
21
|
|
|
@@ -41,19 +32,31 @@ const length = await withSpan('read-document', async (span) => {
|
|
|
41
32
|
});
|
|
42
33
|
```
|
|
43
34
|
|
|
44
|
-
##
|
|
35
|
+
## Who uses it
|
|
45
36
|
|
|
46
|
-
- **
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
- **[`@xynolog/http-transport`](https://github.com/xynolog/sdk/blob/v0.8.1/typescript/http-transport/README.md)** runs each request in a span and carries the trace across the wire. That is how this package comes to be in the Browser's bundle.
|
|
38
|
+
- **[`@xynolog/sdk`](https://github.com/xynolog/sdk/blob/v0.8.1/typescript/sdk/README.md)** carries the trace of a job from the request that made it to the worker that claims it.
|
|
39
|
+
|
|
40
|
+
No Xynolog service is a Node process. The gateway, the dispatcher and the Archivist are Rust and have a crate of their own for this; the Python services have `xynolog_service`.
|
|
41
|
+
|
|
42
|
+
**Building an application?** You do not need this package. The SDK's transport reports through OpenTelemetry's global API, so an application that registers a tracer of its own sees the transport's spans in its traces.
|
|
43
|
+
|
|
44
|
+
## What is in it
|
|
45
|
+
|
|
46
|
+
| Import | |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `@xynolog/observability` | Runs in Node and in a browser. Spans: `withSpan`. Trace context across the bus: `getActiveTraceparent`, `extractTraceparent`, `withTraceparent`; and `withoutTrace`, for work that begins a trace of its own. `recordBusSent`, the count of the emits a client sent |
|
|
49
|
+
| `@xynolog/observability/node` | `initObservabilityNode` and `shutdownObservabilityNode`: the tracer, the meter, the exporter and the context manager of a Node process |
|
|
50
|
+
|
|
51
|
+
Each says what it does where it is defined, in [src/index.ts](https://github.com/xynolog/sdk/blob/v0.8.1/typescript/observability/src/index.ts).
|
|
51
52
|
|
|
52
53
|
## Documentation
|
|
53
54
|
|
|
54
|
-
- [API reference](docs/API.md): the helpers, with an example of each.
|
|
55
|
+
- [API reference](https://github.com/xynolog/sdk/blob/v0.8.1/typescript/observability/docs/API.md): the helpers, with an example of each.
|
|
55
56
|
- [Observability](https://github.com/xynolog/docs/blob/main/operator/administration/OBSERVABILITY.md): the variables that turn it on, and where a stack sends its telemetry.
|
|
56
57
|
|
|
57
58
|
## License
|
|
58
59
|
|
|
59
60
|
Apache-2.0
|
|
61
|
+
|
|
62
|
+
Working on the SDK itself? See [CONTRIBUTING.md](https://github.com/xynolog/sdk/blob/main/CONTRIBUTING.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynolog/observability",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "OpenTelemetry tracing and metrics for Xynolog's TypeScript transport. Node process-init helpers, a withSpan wrapper, W3C trace-context propagation across the bus, and the count of the emits a client sent. No-op when no exporter is configured.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"url": "git+https://github.com/xynolog/sdk.git",
|
|
33
33
|
"directory": "typescript/observability"
|
|
34
34
|
},
|
|
35
|
+
"homepage": "https://github.com/xynolog/sdk#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/xynolog/sdk/issues"
|
|
38
|
+
},
|
|
35
39
|
"scripts": {
|
|
36
40
|
"typecheck": "tsc --noEmit",
|
|
37
41
|
"build": "npm run typecheck && tsup && tsc -p tsconfig.build.json && rollup -c rollup.dts.config.mjs && rm -rf dist-types",
|
|
@@ -61,6 +65,6 @@
|
|
|
61
65
|
"@opentelemetry/sdk-metrics": "^3.0.0",
|
|
62
66
|
"@opentelemetry/sdk-trace": "^3.0.0",
|
|
63
67
|
"@opentelemetry/semantic-conventions": "^1.44.0",
|
|
64
|
-
"@xynolog/core": "0.8.
|
|
68
|
+
"@xynolog/core": "0.8.1"
|
|
65
69
|
}
|
|
66
70
|
}
|