@effectstream/log 0.100.16 → 0.100.17
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 +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
SeverityNumber,
|
|
32
32
|
} from "@effectstream/log";
|
|
33
33
|
|
|
34
|
-
// Initialize OpenTelemetry once at startup (optional
|
|
34
|
+
// Initialize OpenTelemetry once at startup (optional - defaults work too).
|
|
35
35
|
defaultOtelSetup({ serviceName: "my-app" });
|
|
36
36
|
|
|
37
37
|
// Local-only: pretty console output, no OTLP.
|
|
@@ -52,7 +52,7 @@ log.remote(
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
The deferred `(l) => l(...)` form means message construction is skipped
|
|
55
|
-
entirely when the level is filtered out
|
|
55
|
+
entirely when the level is filtered out - handy when log arguments are
|
|
56
56
|
expensive to format (`JSON.stringify` of a big object).
|
|
57
57
|
|
|
58
58
|
Point the SDK at any OTLP-compatible collector (Grafana Alloy, Tempo,
|
|
@@ -60,7 +60,7 @@ Honeycomb, …) via the standard `OTEL_EXPORTER_OTLP_ENDPOINT` env var.
|
|
|
60
60
|
|
|
61
61
|
## Inside EffectStream
|
|
62
62
|
|
|
63
|
-
Every package in the framework
|
|
63
|
+
Every package in the framework - sync, runtime, batcher, sm - logs through
|
|
64
64
|
this module so the whole node emits one consistent trace tree. The
|
|
65
65
|
`ComponentNames` constants tag log records by component, which is what
|
|
66
66
|
powers the orchestrator's per-component log views.
|
|
@@ -71,7 +71,7 @@ powers the orchestrator's per-component log views.
|
|
|
71
71
|
- `log.localForce(...)` bypasses level filtering.
|
|
72
72
|
- `log.remote(...)`: console + OpenTelemetry log record. Same signature as `local`.
|
|
73
73
|
- `log.remoteForce(...)` is `remote` without level filtering.
|
|
74
|
-
- `log.formatMessage(...)`
|
|
74
|
+
- `log.formatMessage(...)` - the formatter used internally; useful for custom transports.
|
|
75
75
|
- `defaultOtelSetup(opts)`: one-call OpenTelemetry SDK setup with sensible defaults.
|
|
76
76
|
- `attachTransport(transport)` registers a custom tslog transport (e.g. ship logs to a file).
|
|
77
77
|
- `SeverityNumber`: re-export of OpenTelemetry severity levels.
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effectstream/log",
|
|
3
|
-
"version": "0.100.
|
|
3
|
+
"version": "0.100.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://effectstream.github.io/docs/",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/
|
|
8
|
+
"url": "https://github.com/effectstream/effectstream",
|
|
9
9
|
"directory": "packages/effectstream-sdk/log"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/effectstream/effectstream/issues"
|
|
13
13
|
},
|
|
14
14
|
"exports": "./src/mod.ts",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@effectstream/utils": "0.100.
|
|
16
|
+
"@effectstream/utils": "0.100.17",
|
|
17
17
|
"@opentelemetry/api": "^1.9.0",
|
|
18
18
|
"@opentelemetry/api-logs": "0.56.0",
|
|
19
19
|
"@opentelemetry/exporter-logs-otlp-http": "0.56.0",
|