@btravstack/observability 0.13.0 → 0.14.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.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/otel.d.cts +4 -5
- package/dist/otel.d.mts +4 -5
- package/dist/pino.d.cts +2 -3
- package/dist/pino.d.mts +2 -3
- package/package.json +14 -14
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ import { Module } from "@btravstack/di";
|
|
|
13
13
|
* `Config.string`, so it inherits the semantics every other variable has: an
|
|
14
14
|
* unset variable takes the default, a set-but-blank one is an error.
|
|
15
15
|
*/
|
|
16
|
-
declare const logLevel: (options?: {
|
|
16
|
+
export declare const logLevel: (options?: {
|
|
17
17
|
readonly default?: Level;
|
|
18
18
|
}) => ConfigField<Level>;
|
|
19
19
|
/** What `observability()` binds from the environment. */
|
|
@@ -32,7 +32,7 @@ type LoggerSettings = {
|
|
|
32
32
|
* The unit's ids are spread at the top level rather than nested under `unit`,
|
|
33
33
|
* because `traceId` is the field an operator searches.
|
|
34
34
|
*/
|
|
35
|
-
declare const jsonSink: (stream?: {
|
|
35
|
+
export declare const jsonSink: (stream?: {
|
|
36
36
|
readonly write: (chunk: string) => unknown;
|
|
37
37
|
}) => Sink;
|
|
38
38
|
//#endregion
|
|
@@ -43,7 +43,7 @@ declare const LoggerConfig_base: import("@btravstack/di").PortClass<"LoggerConfi
|
|
|
43
43
|
* filters at. A port of its own, like a starter's `HttpConfig`, so anything
|
|
44
44
|
* that wants to know reads it rather than re-deriving it.
|
|
45
45
|
*/
|
|
46
|
-
declare class LoggerConfig extends LoggerConfig_base<LoggerSettings> {}
|
|
46
|
+
export declare class LoggerConfig extends LoggerConfig_base<LoggerSettings> {}
|
|
47
47
|
type ObservabilityOptions = {
|
|
48
48
|
/**
|
|
49
49
|
* Where lines go. Default: one JSON object per line on `stdout`. The
|
|
@@ -63,7 +63,7 @@ type ObservabilityOptions = {
|
|
|
63
63
|
* `currentUnit()` per call — so a request's lines are attributable with no
|
|
64
64
|
* argument threaded through the call stack.
|
|
65
65
|
*/
|
|
66
|
-
declare const observability: (options?: ObservabilityOptions) => Module<Logger | LoggerConfig | Observers, ConfigInvalid, Env>;
|
|
66
|
+
export declare const observability: (options?: ObservabilityOptions) => Module<Logger | LoggerConfig | Observers, ConfigInvalid, Env>;
|
|
67
67
|
/**
|
|
68
68
|
* The kernel's nine lifecycle events, as log lines on `logger` — the adapter
|
|
69
69
|
* between `StartOptions.onEvent` and an application's own stream.
|
|
@@ -76,6 +76,6 @@ declare const observability: (options?: ObservabilityOptions) => Module<Logger |
|
|
|
76
76
|
* The logger is a PARAMETER, not resolved: `building` is emitted while the graph
|
|
77
77
|
* is still being built, so the sink cannot come from the context it watches.
|
|
78
78
|
*/
|
|
79
|
-
declare const kernelEvents: (logger: LoggerService) => EventSink;
|
|
79
|
+
export declare const kernelEvents: (logger: LoggerService) => EventSink;
|
|
80
80
|
//#endregion
|
|
81
|
-
export { type Line,
|
|
81
|
+
export { type Line, type LoggerSettings, type ObservabilityOptions, type Sink, createLogger };
|
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ import { Module } from "@btravstack/di";
|
|
|
13
13
|
* `Config.string`, so it inherits the semantics every other variable has: an
|
|
14
14
|
* unset variable takes the default, a set-but-blank one is an error.
|
|
15
15
|
*/
|
|
16
|
-
declare const logLevel: (options?: {
|
|
16
|
+
export declare const logLevel: (options?: {
|
|
17
17
|
readonly default?: Level;
|
|
18
18
|
}) => ConfigField<Level>;
|
|
19
19
|
/** What `observability()` binds from the environment. */
|
|
@@ -32,7 +32,7 @@ type LoggerSettings = {
|
|
|
32
32
|
* The unit's ids are spread at the top level rather than nested under `unit`,
|
|
33
33
|
* because `traceId` is the field an operator searches.
|
|
34
34
|
*/
|
|
35
|
-
declare const jsonSink: (stream?: {
|
|
35
|
+
export declare const jsonSink: (stream?: {
|
|
36
36
|
readonly write: (chunk: string) => unknown;
|
|
37
37
|
}) => Sink;
|
|
38
38
|
//#endregion
|
|
@@ -43,7 +43,7 @@ declare const LoggerConfig_base: import("@btravstack/di").PortClass<"LoggerConfi
|
|
|
43
43
|
* filters at. A port of its own, like a starter's `HttpConfig`, so anything
|
|
44
44
|
* that wants to know reads it rather than re-deriving it.
|
|
45
45
|
*/
|
|
46
|
-
declare class LoggerConfig extends LoggerConfig_base<LoggerSettings> {}
|
|
46
|
+
export declare class LoggerConfig extends LoggerConfig_base<LoggerSettings> {}
|
|
47
47
|
type ObservabilityOptions = {
|
|
48
48
|
/**
|
|
49
49
|
* Where lines go. Default: one JSON object per line on `stdout`. The
|
|
@@ -63,7 +63,7 @@ type ObservabilityOptions = {
|
|
|
63
63
|
* `currentUnit()` per call — so a request's lines are attributable with no
|
|
64
64
|
* argument threaded through the call stack.
|
|
65
65
|
*/
|
|
66
|
-
declare const observability: (options?: ObservabilityOptions) => Module<Logger | LoggerConfig | Observers, ConfigInvalid, Env>;
|
|
66
|
+
export declare const observability: (options?: ObservabilityOptions) => Module<Logger | LoggerConfig | Observers, ConfigInvalid, Env>;
|
|
67
67
|
/**
|
|
68
68
|
* The kernel's nine lifecycle events, as log lines on `logger` — the adapter
|
|
69
69
|
* between `StartOptions.onEvent` and an application's own stream.
|
|
@@ -76,6 +76,6 @@ declare const observability: (options?: ObservabilityOptions) => Module<Logger |
|
|
|
76
76
|
* The logger is a PARAMETER, not resolved: `building` is emitted while the graph
|
|
77
77
|
* is still being built, so the sink cannot come from the context it watches.
|
|
78
78
|
*/
|
|
79
|
-
declare const kernelEvents: (logger: LoggerService) => EventSink;
|
|
79
|
+
export declare const kernelEvents: (logger: LoggerService) => EventSink;
|
|
80
80
|
//#endregion
|
|
81
|
-
export { type Line,
|
|
81
|
+
export { type Line, type LoggerSettings, type ObservabilityOptions, type Sink, createLogger };
|
package/dist/otel.d.cts
CHANGED
|
@@ -29,10 +29,10 @@ import { NodeSDKConfiguration } from "@opentelemetry/sdk-node";
|
|
|
29
29
|
* plan time and in `Needs`. Guice's `newSetBinder` declares the empty set for
|
|
30
30
|
* the same reason.
|
|
31
31
|
*/
|
|
32
|
-
declare const otel: (options?: Partial<NodeSDKConfiguration>) => Module<Tracer | Meter | Observers, never, Scope>;
|
|
32
|
+
export declare const otel: (options?: Partial<NodeSDKConfiguration>) => Module<Tracer | Meter | Observers, never, Scope>;
|
|
33
33
|
declare const UnitSpan_base: import("@btravstack/di").PortClass<"UnitSpan">;
|
|
34
34
|
/** The span a unit rides, ended when the unit's fork closes. */
|
|
35
|
-
declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
35
|
+
export declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
36
36
|
/**
|
|
37
37
|
* A span per unit, as a module a starter's own `unit` option binds: the runtime
|
|
38
38
|
* forks it around every unit it opens, so the span opens when the fork is built
|
|
@@ -47,6 +47,5 @@ declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
|
47
47
|
* Bind it as a starter's `unit` module — `unit: { anonymous: UnitSpanModule }`,
|
|
48
48
|
* `unit: { message: … }`, `unit: { activity: … }`; the root must export `Tracer`.
|
|
49
49
|
*/
|
|
50
|
-
declare const UnitSpanModule: Module<UnitSpan, never, Scope | Tracer>;
|
|
51
|
-
//#endregion
|
|
52
|
-
export { UnitSpan, UnitSpanModule, otel };
|
|
50
|
+
export declare const UnitSpanModule: Module<UnitSpan, never, Scope | Tracer>;
|
|
51
|
+
//#endregion
|
package/dist/otel.d.mts
CHANGED
|
@@ -29,10 +29,10 @@ import { NodeSDKConfiguration } from "@opentelemetry/sdk-node";
|
|
|
29
29
|
* plan time and in `Needs`. Guice's `newSetBinder` declares the empty set for
|
|
30
30
|
* the same reason.
|
|
31
31
|
*/
|
|
32
|
-
declare const otel: (options?: Partial<NodeSDKConfiguration>) => Module<Tracer | Meter | Observers, never, Scope>;
|
|
32
|
+
export declare const otel: (options?: Partial<NodeSDKConfiguration>) => Module<Tracer | Meter | Observers, never, Scope>;
|
|
33
33
|
declare const UnitSpan_base: import("@btravstack/di").PortClass<"UnitSpan">;
|
|
34
34
|
/** The span a unit rides, ended when the unit's fork closes. */
|
|
35
|
-
declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
35
|
+
export declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
36
36
|
/**
|
|
37
37
|
* A span per unit, as a module a starter's own `unit` option binds: the runtime
|
|
38
38
|
* forks it around every unit it opens, so the span opens when the fork is built
|
|
@@ -47,6 +47,5 @@ declare class UnitSpan extends UnitSpan_base<Span> {}
|
|
|
47
47
|
* Bind it as a starter's `unit` module — `unit: { anonymous: UnitSpanModule }`,
|
|
48
48
|
* `unit: { message: … }`, `unit: { activity: … }`; the root must export `Tracer`.
|
|
49
49
|
*/
|
|
50
|
-
declare const UnitSpanModule: Module<UnitSpan, never, Scope | Tracer>;
|
|
51
|
-
//#endregion
|
|
52
|
-
export { UnitSpan, UnitSpanModule, otel };
|
|
50
|
+
export declare const UnitSpanModule: Module<UnitSpan, never, Scope | Tracer>;
|
|
51
|
+
//#endregion
|
package/dist/pino.d.cts
CHANGED
|
@@ -22,6 +22,5 @@ import { Logger } from "pino";
|
|
|
22
22
|
* validated at startup. `fatal` and `trace` map to pino's own; the ambient
|
|
23
23
|
* unit's ids ride as fields, not as a message prefix, so they stay indexable.
|
|
24
24
|
*/
|
|
25
|
-
declare const pinoSink: (logger: Logger) => Sink;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { pinoSink };
|
|
25
|
+
export declare const pinoSink: (logger: Logger) => Sink;
|
|
26
|
+
//#endregion
|
package/dist/pino.d.mts
CHANGED
|
@@ -22,6 +22,5 @@ import { Logger } from "pino";
|
|
|
22
22
|
* validated at startup. `fatal` and `trace` map to pino's own; the ambient
|
|
23
23
|
* unit's ids ride as fields, not as a message prefix, so they stay indexable.
|
|
24
24
|
*/
|
|
25
|
-
declare const pinoSink: (logger: Logger) => Sink;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { pinoSink };
|
|
25
|
+
export declare const pinoSink: (logger: Logger) => Sink;
|
|
26
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btravstack/observability",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Observability for @btravstack/core: a strict Logger port correlated with the kernel's units, a dependency-free JSON sink, and the lifecycle events as log lines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dependency-injection",
|
|
@@ -67,29 +67,29 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@btravstack/tsconfig": "0.4.0",
|
|
69
69
|
"@opentelemetry/api": "1.9.1",
|
|
70
|
-
"@opentelemetry/sdk-node": "0.
|
|
71
|
-
"@opentelemetry/sdk-trace": "2.
|
|
72
|
-
"@types/node": "26.4.
|
|
73
|
-
"@unthrown/vitest": "5.
|
|
70
|
+
"@opentelemetry/sdk-node": "0.222.0",
|
|
71
|
+
"@opentelemetry/sdk-trace": "2.11.0",
|
|
72
|
+
"@types/node": "26.4.1",
|
|
73
|
+
"@unthrown/vitest": "5.8.0",
|
|
74
74
|
"@vitest/coverage-v8": "4.1.11",
|
|
75
75
|
"pino": "10.3.1",
|
|
76
|
-
"tsdown": "0.
|
|
76
|
+
"tsdown": "0.23.0",
|
|
77
77
|
"typescript": "7.0.2",
|
|
78
|
-
"unthrown": "5.
|
|
78
|
+
"unthrown": "5.8.0",
|
|
79
79
|
"vitest": "4.1.11",
|
|
80
|
-
"@btravstack/config": "0.
|
|
81
|
-
"@btravstack/core": "0.
|
|
82
|
-
"@btravstack/di": "0.
|
|
83
|
-
"@btravstack/testing": "0.
|
|
80
|
+
"@btravstack/config": "0.14.0",
|
|
81
|
+
"@btravstack/core": "0.14.0",
|
|
82
|
+
"@btravstack/di": "0.14.0",
|
|
83
|
+
"@btravstack/testing": "0.14.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@opentelemetry/api": "^1.9.0",
|
|
87
87
|
"@opentelemetry/sdk-node": "^0.221.0",
|
|
88
88
|
"pino": "^10",
|
|
89
89
|
"unthrown": "^5.0.0",
|
|
90
|
-
"@btravstack/config": "^0.
|
|
91
|
-
"@btravstack/core": "^0.
|
|
92
|
-
"@btravstack/di": "^0.
|
|
90
|
+
"@btravstack/config": "^0.14.0",
|
|
91
|
+
"@btravstack/core": "^0.14.0",
|
|
92
|
+
"@btravstack/di": "^0.14.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
95
|
"@opentelemetry/api": {
|