@toa.io/extensions.telemetry 1.0.0-alpha.283 → 1.0.0-alpha.286

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/grafana.md CHANGED
@@ -50,7 +50,7 @@ Toa stamps `trace_id` and `span_id` into every log entry written within a span
50
50
  (including unsampled traces), so once pod logs are shipped to Loki,
51
51
  traces and logs link up with two datasource settings:
52
52
 
53
- - Tempo datasource, *Trace to logs*: select the Loki datasource,
53
+ - Tempo datasource, _Trace to logs_: select the Loki datasource,
54
54
  set time shifts (e.g. `-5m`/`+5m`) and a custom query:
55
55
 
56
56
  ```logql
@@ -58,7 +58,8 @@ traces and logs link up with two datasource settings:
58
58
  ```
59
59
 
60
60
  Append `` | span_id = `${__span.spanId}` `` to narrow down to a single span.
61
- - Loki datasource, *Derived fields*: regex `"trace_id":"([0-9a-f]+)"`,
61
+
62
+ - Loki datasource, _Derived fields_: regex `"trace_id":"([0-9a-f]+)"`,
62
63
  query `${__value.raw}`, internal link to the Tempo datasource.
63
64
 
64
65
  Logs of unsampled traces carry a `trace_id` that does not exist in Tempo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.telemetry",
3
- "version": "1.0.0-alpha.283",
3
+ "version": "1.0.0-alpha.286",
4
4
  "type": "module",
5
5
  "description": "Toa Telemetry extension",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -21,7 +21,7 @@
21
21
  "transpile": "tsc"
22
22
  },
23
23
  "dependencies": {
24
- "openspan": "1.0.0-alpha.277"
24
+ "openspan": "1.0.0-alpha.286"
25
25
  },
26
- "gitHead": "2f52b023bed0ccb2ecdb2b82fe59fbe38bf282e1"
26
+ "gitHead": "81f3d0688f17668b902be336d1749cc715edcdb6"
27
27
  }
package/readme.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Structured logs can be written using the `logs` Context Aspect.
6
6
 
7
7
  ```javascript
8
- async function computation (input, context) {
8
+ async function computation(input, context) {
9
9
  context.logs.info('Hello, world', { foo: 'bar' })
10
10
  }
11
11
  ```
@@ -20,15 +20,15 @@ severity levels, with the following signature:
20
20
  Logs are formatted as JSON and written to stdout or stderr. The log entry format is:
21
21
 
22
22
  ```yaml
23
- time: string # ISO 8601 timestamp
24
- severity: string # TRACE, DEBUG, INFO, WARN, ERROR
23
+ time: string # ISO 8601 timestamp
24
+ severity: string # TRACE, DEBUG, INFO, WARN, ERROR
25
25
  message: string
26
26
  attributes?: object
27
27
  context:
28
28
  namespace: string
29
29
  component: string
30
30
  operation: string
31
- trace_id?: string # see Tracing
31
+ trace_id?: string # see Tracing
32
32
  span_id?: string
33
33
  ```
34
34
 
@@ -44,7 +44,7 @@ Logs can be configured using `telemetry` Context Annotation.
44
44
 
45
45
  telemetry:
46
46
  logs:
47
- level: debug # trace < debug < info < warn < error
47
+ level: debug # trace < debug < info < warn < error
48
48
  level@production: info
49
49
  ```
50
50
 
@@ -62,7 +62,7 @@ telemetry:
62
62
 
63
63
  ## Tracing
64
64
 
65
- Each operation invocation runs within a *span*.
65
+ Each operation invocation runs within a _span_.
66
66
  If the incoming request carries a trace context ([W3C Trace Context](https://www.w3.org/TR/trace-context/)),
67
67
  the span continues the trace, otherwise a new trace starts.
68
68
  All log entries written during the invocation are automatically stamped with `trace_id` and
@@ -72,12 +72,12 @@ When a span completes, an entry with the `TRACE` severity is written with the sp
72
72
  message and the following additional fields:
73
73
 
74
74
  ```yaml
75
- trace_id: string # 32 hex characters, shared by all spans and logs of the trace
76
- span_id: string # 16 hex characters
75
+ trace_id: string # 32 hex characters, shared by all spans and logs of the trace
76
+ span_id: string # 16 hex characters
77
77
  parent_id?: string # span_id of the enclosing span
78
- duration: number # milliseconds
79
- kind?: string # server, client, producer, consumer; internal when omitted
80
- status?: error # present if an exception was thrown
78
+ duration: number # milliseconds
79
+ kind?: string # server, client, producer, consumer; internal when omitted
80
+ status?: error # present if an exception was thrown
81
81
  ```
82
82
 
83
83
  Remote calls produce a `client`/`server` span pair: the gap between their durations
@@ -115,7 +115,7 @@ environments). Spans are executed regardless of the log level.
115
115
  Sub-steps of an operation can be measured using the `span` Context Aspect:
116
116
 
117
117
  ```javascript
118
- async function computation (input, context) {
118
+ async function computation(input, context) {
119
119
  const rate = await context.span('fetch rate', () => fetch(RATES_URL))
120
120
 
121
121
  return input.amount * rate
@@ -140,7 +140,7 @@ Spans can be nested: spans created and logs written inside `task` are linked to
140
140
  span.
141
141
 
142
142
  ```javascript
143
- async function computation (input, context) {
143
+ async function computation(input, context) {
144
144
  return context.span('convert', { currency: input.currency }, async () => {
145
145
  const rate = await context.span('fetch rate', () => fetch(RATES_URL))
146
146
 
@@ -163,8 +163,8 @@ context: log entries carry `trace_id`, only span entries are not written.
163
163
 
164
164
  telemetry:
165
165
  traces:
166
- sample: 0.1 # probability of recording a trace, 0..1, defaults to 1
167
- rate: 5 # maximum recorded traces per second per process, unlimited when omitted
166
+ sample: 0.1 # probability of recording a trace, 0..1, defaults to 1
167
+ rate: 5 # maximum recorded traces per second per process, unlimited when omitted
168
168
  ```
169
169
 
170
170
  - `sample: 0` disables recording entirely, `1` records every trace.
@@ -172,12 +172,12 @@ telemetry:
172
172
  to the traffic, while `rate` sets a hard cap (token bucket). It may be fractional:
173
173
  `0.5` is one trace per 2 seconds.
174
174
 
175
- When both are set, a trace is recorded if the `sample` lottery passes *and* the rate limit
175
+ When both are set, a trace is recorded if the `sample` lottery passes _and_ the rate limit
176
176
  is not exceeded.
177
177
 
178
178
  ### Exporting
179
179
 
180
- Recorded spans are passed to a set of *exporters*:
180
+ Recorded spans are passed to a set of _exporters_:
181
181
 
182
182
  - `console` — writes spans as `TRACE` log entries to stdout (requires the `trace` log level,
183
183
  the default on local environments)
@@ -196,9 +196,9 @@ telemetry:
196
196
  exporters:
197
197
  console: ~
198
198
  otlp:
199
- endpoint: http://tempo:4318 # POSTs to {endpoint}/v1/traces
200
- timeout: 5000 # request timeout, milliseconds
201
- cooldown: 30000 # how long to drop spans for after a failed export
199
+ endpoint: http://tempo:4318 # POSTs to {endpoint}/v1/traces
200
+ timeout: 5000 # request timeout, milliseconds
201
+ cooldown: 30000 # how long to drop spans for after a failed export
202
202
  ```
203
203
 
204
204
  When the `exporters` key is omitted, spans are exported to the console.
@@ -234,7 +234,9 @@ Logs are not comments or documentation, nor are they a replacement for them.
234
234
  :-1: Don't:
235
235
 
236
236
  ```javascript
237
- context.logs.error('Failed to send the email, please check the email server configuration')
237
+ context.logs.error(
238
+ 'Failed to send the email, please check the email server configuration'
239
+ )
238
240
  ```
239
241
 
240
242
  :+1: Do:
package/source/Logs.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Connector } from '@toa.io/core'
2
2
  import { console } from 'openspan'
3
3
  import type { Channel, Console, ConsoleOptions } from 'openspan'
4
- import type { Locator, extensions } from '@toa.io/core'
4
+ import type { Locator } from '@toa.io/core'
5
+ import type { extensions } from '@toa.io/core/types'
5
6
 
6
7
  export class Logs extends Connector implements extensions.Aspect {
7
8
  public readonly name = 'logs'
@@ -9,7 +10,7 @@ export class Logs extends Connector implements extensions.Aspect {
9
10
  private readonly console: Console
10
11
  private readonly consoles: Record<string, Console> = {}
11
12
 
12
- public constructor (locator: Locator, options: LogsOptions) {
13
+ public constructor(locator: Locator, options: LogsOptions) {
13
14
  super()
14
15
 
15
16
  this.locator = locator
@@ -17,9 +18,14 @@ export class Logs extends Connector implements extensions.Aspect {
17
18
  this.console.configure(options)
18
19
  }
19
20
 
20
- public invoke (operation: string, fork: 'fork', context: object): Console
21
+ public invoke(operation: string, fork: 'fork', context: object): Console
21
22
  // eslint-disable-next-line max-params
22
- public invoke (operation: string, severity: Channel | 'fork', message: string | object, attributes?: object): Console | undefined {
23
+ public invoke(
24
+ operation: string,
25
+ severity: Channel | 'fork',
26
+ message: string | object,
27
+ attributes?: object
28
+ ): Console | undefined {
23
29
  if (!(operation in this.consoles))
24
30
  this.consoles[operation] = this.console.fork({
25
31
  namespace: this.locator.namespace,
@@ -30,7 +36,10 @@ export class Logs extends Connector implements extensions.Aspect {
30
36
  if (severity === 'fork')
31
37
  return this.consoles[operation].fork(message as Record<string, unknown>)
32
38
  else
33
- this.consoles[operation][severity](message as string, attributes as Record<string, unknown>)
39
+ this.consoles[operation][severity](
40
+ message as string,
41
+ attributes as Record<string, unknown>
42
+ )
34
43
  }
35
44
  }
36
45
 
@@ -24,7 +24,12 @@ it('should signal readiness', async () => {
24
24
  await ready.connect()
25
25
  await ready.complete()
26
26
 
27
- assert.ok(send.mock.calls.some((call: any) => call.arguments.length === 1 && isDeepStrictEqual(call.arguments[0], 'ready')))
27
+ assert.ok(
28
+ send.mock.calls.some(
29
+ (call: any) =>
30
+ call.arguments.length === 1 && isDeepStrictEqual(call.arguments[0], 'ready')
31
+ )
32
+ )
28
33
 
29
34
  await ready.disconnect()
30
35
  })
@@ -40,7 +45,12 @@ it('should signal readiness when the probe port is taken', async () => {
40
45
 
41
46
  await second.complete()
42
47
 
43
- assert.ok(send.mock.calls.some((call: any) => call.arguments.length === 1 && isDeepStrictEqual(call.arguments[0], 'ready')))
48
+ assert.ok(
49
+ send.mock.calls.some(
50
+ (call: any) =>
51
+ call.arguments.length === 1 && isDeepStrictEqual(call.arguments[0], 'ready')
52
+ )
53
+ )
44
54
 
45
55
  await first.disconnect()
46
56
  await second.disconnect()
package/source/Ready.ts CHANGED
@@ -12,25 +12,23 @@ export class Ready extends Connector {
12
12
  private listening = false
13
13
  private skipped = false
14
14
 
15
- public constructor (options: ReadyOptions) {
15
+ public constructor(options: ReadyOptions) {
16
16
  super()
17
17
 
18
18
  this.options = options
19
19
  this.server.on('request', (req, res) => this.#listener(req, res))
20
20
  }
21
21
 
22
- public static create (): Ready | null {
22
+ public static create(): Ready | null {
23
23
  const options = resolveOptions()
24
24
 
25
- if (options === null)
26
- return null
25
+ if (options === null) return null
27
26
 
28
27
  return new Ready(options)
29
28
  }
30
29
 
31
- public async listen (): Promise<void> {
32
- if (this.listening || this.skipped)
33
- return
30
+ public async listen(): Promise<void> {
31
+ if (this.listening || this.skipped) return
34
32
 
35
33
  this.startedAt = Date.now()
36
34
 
@@ -54,7 +52,9 @@ export class Ready extends Connector {
54
52
  // Local multi-process (pm2 + features) shares a host; k8s pods do not.
55
53
  if (error?.code === 'EADDRINUSE') {
56
54
  this.skipped = true
57
- console.warn('Ready probe port already in use, skipping', { port: this.options.port })
55
+ console.warn('Ready probe port already in use, skipping', {
56
+ port: this.options.port
57
+ })
58
58
 
59
59
  return
60
60
  }
@@ -68,7 +68,7 @@ export class Ready extends Connector {
68
68
  this.server.unref()
69
69
  }
70
70
 
71
- public async complete (): Promise<void> {
71
+ public async complete(): Promise<void> {
72
72
  await this.listen()
73
73
 
74
74
  this.ready = true
@@ -80,15 +80,14 @@ export class Ready extends Connector {
80
80
  process.send?.('ready')
81
81
  }
82
82
 
83
- protected override async open (): Promise<void> {
83
+ protected override async open(): Promise<void> {
84
84
  await this.listen()
85
85
  }
86
86
 
87
- protected override async close (): Promise<void> {
87
+ protected override async close(): Promise<void> {
88
88
  this.ready = false
89
89
 
90
- if (!this.listening)
91
- return
90
+ if (!this.listening) return
92
91
 
93
92
  this.listening = false
94
93
 
@@ -98,15 +97,14 @@ export class Ready extends Connector {
98
97
  await new Promise<void>((resolve) => this.server.close(() => resolve()))
99
98
  }
100
99
 
101
- #listener (request: http.IncomingMessage, response: http.ServerResponse): void {
100
+ #listener(request: http.IncomingMessage, response: http.ServerResponse): void {
102
101
  if (request.url !== this.options.path) {
103
102
  response.writeHead(404).end()
104
103
 
105
104
  return
106
105
  }
107
106
 
108
- if (this.ready)
109
- response.writeHead(200, { 'cache-control': 'no-store' }).end()
107
+ if (this.ready) response.writeHead(200, { 'cache-control': 'no-store' }).end()
110
108
  else {
111
109
  const remaining = Math.ceil((Date.now() - this.startedAt) / 1000).toString()
112
110
 
@@ -115,16 +113,14 @@ export class Ready extends Connector {
115
113
  }
116
114
  }
117
115
 
118
- export function resolveOptions (): ReadyOptions | null {
116
+ export function resolveOptions(): ReadyOptions | null {
119
117
  const env = process.env[READY_ENV]
120
118
 
121
- if (env === undefined)
122
- return { ...DEFAULTS }
119
+ if (env === undefined) return { ...DEFAULTS }
123
120
 
124
121
  const decoded = JSON.parse(env) as ReadyConfig
125
122
 
126
- if (decoded === false || decoded.enabled === false)
127
- return null
123
+ if (decoded === false || decoded.enabled === false) return null
128
124
 
129
125
  return {
130
126
  path: decoded.path ?? DEFAULTS.path,
@@ -132,12 +128,12 @@ export function resolveOptions (): ReadyOptions | null {
132
128
  }
133
129
  }
134
130
 
135
- export function normalizeAnnotation (ready: ReadyAnnotation | undefined): ReadyConfig | false {
136
- if (ready === false)
137
- return false
131
+ export function normalizeAnnotation(
132
+ ready: ReadyAnnotation | undefined
133
+ ): ReadyConfig | false {
134
+ if (ready === false) return false
138
135
 
139
- if (ready === undefined)
140
- return { enabled: true, ...DEFAULT_ANNOTATION }
136
+ if (ready === undefined) return { enabled: true, ...DEFAULT_ANNOTATION }
141
137
 
142
138
  return {
143
139
  enabled: true,
@@ -159,13 +155,17 @@ export interface ReadyOptions {
159
155
  port: number
160
156
  }
161
157
 
162
- export type ReadyAnnotation = false | {
163
- path?: string
164
- port?: number
165
- }
158
+ export type ReadyAnnotation =
159
+ | false
160
+ | {
161
+ path?: string
162
+ port?: number
163
+ }
166
164
 
167
- export type ReadyConfig = false | {
168
- enabled?: boolean
169
- path?: string
170
- port?: number
171
- }
165
+ export type ReadyConfig =
166
+ | false
167
+ | {
168
+ enabled?: boolean
169
+ path?: string
170
+ port?: number
171
+ }
package/source/Span.ts CHANGED
@@ -1,21 +1,27 @@
1
1
  import { Connector } from '@toa.io/core'
2
2
  import { console } from 'openspan'
3
3
  import type { Console, Task } from 'openspan'
4
- import type { Locator, extensions } from '@toa.io/core'
4
+ import type { Locator } from '@toa.io/core'
5
+ import type { extensions } from '@toa.io/core/types'
5
6
 
6
7
  export class Span extends Connector implements extensions.Aspect {
7
8
  public readonly name = 'span'
8
9
  private readonly locator: Locator
9
10
  private readonly consoles: Record<string, Console> = {}
10
11
 
11
- public constructor (locator: Locator) {
12
+ public constructor(locator: Locator) {
12
13
  super()
13
14
 
14
15
  this.locator = locator
15
16
  }
16
17
 
17
18
  // eslint-disable-next-line max-params
18
- public async invoke (operation: string, name: string, attributes: object | Task<unknown>, task?: Task<unknown>): Promise<unknown> {
19
+ public async invoke(
20
+ operation: string,
21
+ name: string,
22
+ attributes: object | Task<unknown>,
23
+ task?: Task<unknown>
24
+ ): Promise<unknown> {
19
25
  this.consoles[operation] ??= console.fork({
20
26
  namespace: this.locator.namespace,
21
27
  component: this.locator.name,
@@ -26,7 +32,6 @@ export class Span extends Connector implements extensions.Aspect {
26
32
 
27
33
  if (typeof attributes === 'function')
28
34
  return await output.span(name, attributes as Task<unknown>)
29
- else
30
- return await output.span(name, attributes, task!)
35
+ else return await output.span(name, attributes, task!)
31
36
  }
32
37
  }
package/source/context.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { Contribution } from '@toa.io/core'
1
+ import type { Contribution } from '@toa.io/core/types'
2
2
 
3
3
  /** What this extension puts on the context of every component, being declared for all. */
4
- export function context (): Contribution[] {
4
+ export function context(): Contribution[] {
5
5
  const imports = { '@toa.io/extensions.telemetry': ['Logs', 'Span'] }
6
6
 
7
7
  return [
@@ -10,7 +10,8 @@ import {
10
10
  type ReadyAnnotation
11
11
  } from './Ready.js'
12
12
  import type { LogsOptions } from './Logs.js'
13
- import type { Connector, Locator, extensions } from '@toa.io/core'
13
+ import type { Connector, Locator } from '@toa.io/core'
14
+ import type { extensions } from '@toa.io/core/types'
14
15
  import type { Dependency, Probe, Variables } from '@toa.io/operations'
15
16
  import type { ExportersConfig, LevelName, TracesOptions } from 'openspan'
16
17
 
@@ -18,7 +19,7 @@ export class Factory implements extensions.Factory {
18
19
  private readonly logsOptions: LogsOptions
19
20
  private readonly ready: Ready | null
20
21
 
21
- public constructor () {
22
+ public constructor() {
22
23
  const globEnv = process.env[LOGS_PREFIX]
23
24
  const level = process.env.TOA_DEV === '1' ? 'trace' : 'info'
24
25
 
@@ -29,21 +30,22 @@ export class Factory implements extensions.Factory {
29
30
 
30
31
  const tracesEnv = process.env[TRACES_ENV]
31
32
 
32
- traces(tracesEnv === undefined ? development() : JSON.parse(tracesEnv) as TracesOptions)
33
+ traces(
34
+ tracesEnv === undefined ? development() : (JSON.parse(tracesEnv) as TracesOptions)
35
+ )
33
36
 
34
37
  this.ready = Ready.create()
35
38
  }
36
39
 
37
- public aspect (locator: Locator): extensions.Aspect[] {
40
+ public aspect(locator: Locator): extensions.Aspect[] {
38
41
  const logs = this.createLogs(locator)
39
42
  const span = new Span(locator)
40
43
 
41
44
  return [logs, span]
42
45
  }
43
46
 
44
- public manage (composition: Connector): Connector {
45
- if (this.ready === null)
46
- return composition
47
+ public manage(composition: Connector): Connector {
48
+ if (this.ready === null) return composition
47
49
 
48
50
  const ready = this.ready
49
51
 
@@ -61,7 +63,7 @@ export class Factory implements extensions.Factory {
61
63
  return composition
62
64
  }
63
65
 
64
- private createLogs (locator: Locator): extensions.Aspect {
66
+ private createLogs(locator: Locator): extensions.Aspect {
65
67
  const overEnv = process.env[`${LOGS_PREFIX}_${locator.uppercase}`]
66
68
  const override = overEnv !== undefined ? JSON.parse(overEnv) : undefined
67
69
 
@@ -80,20 +82,18 @@ export class Factory implements extensions.Factory {
80
82
  * `extensions/exposition/source/Factory.ts` says the same thing for the gateway process,
81
83
  * which boots without this extension.
82
84
  */
83
- function development (): TracesOptions {
85
+ function development(): TracesOptions {
84
86
  const local = process.env.TOA_DEV === '1' || process.env.TOA_BOOT_TRACE === '1'
85
87
 
86
88
  return local ? { exporters: { console: {} } } : {}
87
89
  }
88
90
 
89
- export function deployment (_: unknown, annotation?: Annotation): Dependency {
91
+ export function deployment(_: unknown, annotation?: Annotation): Dependency {
90
92
  const variables: Variables = { global: [] }
91
93
 
92
- if (annotation?.logs !== undefined)
93
- addLogsVariables(annotation.logs, variables)
94
+ if (annotation?.logs !== undefined) addLogsVariables(annotation.logs, variables)
94
95
 
95
- if (annotation?.traces !== undefined)
96
- addTracesVariables(annotation.traces, variables)
96
+ if (annotation?.traces !== undefined) addTracesVariables(annotation.traces, variables)
97
97
 
98
98
  const ready = normalizeAnnotation(annotation?.ready)
99
99
 
@@ -113,7 +113,7 @@ export function deployment (_: unknown, annotation?: Annotation): Dependency {
113
113
  return { variables, probe }
114
114
  }
115
115
 
116
- function addLogsVariables (annotation: LogsAnnotation, variables: Variables): void {
116
+ function addLogsVariables(annotation: LogsAnnotation, variables: Variables): void {
117
117
  const { level, ...components } = annotation
118
118
  const global = { level }
119
119
 
@@ -131,22 +131,31 @@ function addLogsVariables (annotation: LogsAnnotation, variables: Variables): vo
131
131
  }
132
132
  }
133
133
 
134
- function addTracesVariables (annotation: TracesAnnotation, variables: Variables): void {
134
+ function addTracesVariables(annotation: TracesAnnotation, variables: Variables): void {
135
135
  const { sample, rate, exporters } = annotation
136
136
 
137
137
  if (sample !== undefined)
138
- assert.ok(typeof sample === 'number' && sample >= 0 && sample <= 1,
139
- 'telemetry.traces.sample must be a number within [0, 1]')
138
+ assert.ok(
139
+ typeof sample === 'number' && sample >= 0 && sample <= 1,
140
+ 'telemetry.traces.sample must be a number within [0, 1]'
141
+ )
140
142
 
141
143
  if (rate !== undefined)
142
- assert.ok(typeof rate === 'number' && rate > 0,
143
- 'telemetry.traces.rate must be a positive number')
144
+ assert.ok(
145
+ typeof rate === 'number' && rate > 0,
146
+ 'telemetry.traces.rate must be a positive number'
147
+ )
144
148
 
145
149
  if (exporters?.otlp !== undefined)
146
- assert.ok(typeof exporters.otlp.endpoint === 'string',
147
- 'telemetry.traces.exporters.otlp.endpoint is required')
148
-
149
- variables.global.push({ name: TRACES_ENV, value: JSON.stringify({ sample, rate, exporters }) })
150
+ assert.ok(
151
+ typeof exporters.otlp.endpoint === 'string',
152
+ 'telemetry.traces.exporters.otlp.endpoint is required'
153
+ )
154
+
155
+ variables.global.push({
156
+ name: TRACES_ENV,
157
+ value: JSON.stringify({ sample, rate, exporters })
158
+ })
150
159
  }
151
160
 
152
161
  interface Annotation {
@@ -1,6 +1,7 @@
1
1
  import { Connector } from '@toa.io/core';
2
2
  import type { Console, ConsoleOptions } from 'openspan';
3
- import type { Locator, extensions } from '@toa.io/core';
3
+ import type { Locator } from '@toa.io/core';
4
+ import type { extensions } from '@toa.io/core/types';
4
5
  export declare class Logs extends Connector implements extensions.Aspect {
5
6
  readonly name = "logs";
6
7
  private readonly locator;
@@ -1 +1 @@
1
- {"version":3,"file":"Logs.js","sourceRoot":"","sources":["../source/Logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAIlC,MAAM,OAAO,IAAK,SAAQ,SAAS;IACjB,IAAI,GAAG,MAAM,CAAA;IACZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAChB,QAAQ,GAA4B,EAAE,CAAA;IAEvD,YAAoB,OAAgB,EAAE,OAAoB;QACxD,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;QAC7B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;IAGD,sCAAsC;IAC/B,MAAM,CAAE,SAAiB,EAAE,QAA0B,EAAE,OAAwB,EAAE,UAAmB;QACzG,IAAI,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC3C,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;gBACjC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;gBAC5B,SAAS;aACV,CAAC,CAAA;QAEJ,IAAI,QAAQ,KAAK,MAAM;YACr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CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAChC,OAAiB,EACjB,UAAqC,CACtC,CAAA;IACL,CAAC;CACF"}
@@ -43,7 +43,9 @@ export class Ready extends Connector {
43
43
  // Local multi-process (pm2 + features) shares a host; k8s pods do not.
44
44
  if (error?.code === 'EADDRINUSE') {
45
45
  this.skipped = true;
46
- console.warn('Ready probe port already in use, skipping', { port: this.options.port });
46
+ console.warn('Ready probe port already in use, skipping', {
47
+ port: this.options.port
48
+ });
47
49
  return;
48
50
  }
49
51
  throw error;
@@ -1 +1 @@
1
- {"version":3,"file":"Ready.js","sourceRoot":"","sources":["../source/Ready.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,OAAO,KAAM,SAAQ,SAAS;IAClB,IAAI,GAAG,OAAO,CAAA;IAEb,MAAM,GAAgB,IAAI,CAAC,YAAY,EAAE,CAAA;IACzC,OAAO,CAAc;IAC9B,KAAK,GAAG,KAAK,CAAA;IACb,SAAS,GAAG,CAAC,CAAA;IACb,SAAS,GAAG,KAAK,CAAA;IACjB,OAAO,GAAG,KAAK,CAAA;IAEvB,YAAoB,OAAqB;QACvC,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;IACnE,CAAC;IAEM,MAAM,CAAC,MAAM;QAClB,MAAM,OAAO,GAAG,cAAc,EAAE,CAAA;QAEhC,IAAI,OAAO,KAAK,IAAI;YAClB,OAAO,IAAI,CAAA;QAEb,OAAO,IAAI,KAAK,CAAC,OAA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K,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAC/E,CACF,CAAA;IAED,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;AAC1B,CAAC,CAAC,CAAA;AAEF,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;IACpE,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAG,CAAA;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAG,CAAA;IAE9B,MAAM,KAAK,CAAC,OAAO,EAAE,CAAA;IACrB,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;IAEtB,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAA;IAEvB,MAAM,CAAC,EAAE,CACP,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAClB,CAAC,IAAS,EAAE,EAAE,CACZ,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAC/E,CACF,CAAA;IAED,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;IACxB,MAAM,MAAM,CAAC,UAAU,EAAE,CAAA;AAC3B,CAAC,CAAC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { Connector } from '@toa.io/core';
2
2
  import type { Task } from 'openspan';
3
- import type { Locator, extensions } from '@toa.io/core';
3
+ import type { Locator } from '@toa.io/core';
4
+ import type { extensions } from '@toa.io/core/types';
4
5
  export declare class Span extends Connector implements extensions.Aspect {
5
6
  readonly name = "span";
6
7
  private readonly locator;
@@ -1 +1 @@
1
- {"version":3,"file":"Span.js","sourceRoot":"","sources":["../source/Span.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAA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,IAAY,EACZ,UAAkC,EAClC,IAAoB;QAEpB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;YACxC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;YACjC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;YAC5B,SAAS;SACV,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;QAEvC,IAAI,OAAO,UAAU,KAAK,UAAU;YAClC,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,UAA2B,CAAC,CAAA;;YACxD,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAK,CAAC,CAAA;IACxD,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
- import type { Contribution } from '@toa.io/core';
1
+ import type { Contribution } from '@toa.io/core/types';
2
2
  /** What this extension puts on the context of every component, being declared for all. */
3
3
  export declare function context(): Contribution[];