@mastra/observability 1.2.1-alpha.0 → 1.3.0-alpha.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/CHANGELOG.md +30 -0
- package/LICENSE.md +15 -0
- package/README.md +62 -1
- package/dist/bus/base.d.ts +43 -0
- package/dist/bus/base.d.ts.map +1 -0
- package/dist/bus/index.d.ts +7 -0
- package/dist/bus/index.d.ts.map +1 -0
- package/dist/bus/observability-bus.d.ts +97 -0
- package/dist/bus/observability-bus.d.ts.map +1 -0
- package/dist/bus/route-event.d.ts +31 -0
- package/dist/bus/route-event.d.ts.map +1 -0
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/logger.d.ts +45 -0
- package/dist/context/logger.d.ts.map +1 -0
- package/dist/context/metrics.d.ts +47 -0
- package/dist/context/metrics.d.ts.map +1 -0
- package/dist/exporters/base.d.ts +11 -0
- package/dist/exporters/base.d.ts.map +1 -1
- package/dist/exporters/index.d.ts +0 -1
- package/dist/exporters/index.d.ts.map +1 -1
- package/dist/exporters/test.d.ts +538 -3
- package/dist/exporters/test.d.ts.map +1 -1
- package/dist/index.cjs +1165 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1155 -101
- package/dist/index.js.map +1 -1
- package/dist/instances/base.d.ts +77 -10
- package/dist/instances/base.d.ts.map +1 -1
- package/dist/metrics/auto-extract.d.ts +47 -0
- package/dist/metrics/auto-extract.d.ts.map +1 -0
- package/dist/metrics/cardinality.d.ts +24 -0
- package/dist/metrics/cardinality.d.ts.map +1 -0
- package/dist/metrics/index.d.ts +6 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/exporters/json.d.ts +0 -386
- package/dist/exporters/json.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @mastra/observability
|
|
2
2
|
|
|
3
|
+
## 1.3.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Adds the ObservabilityBus with built-in promise tracking and flush support, laying the groundwork for fixing #13388 where spans were lost in durable execution contexts. ([#13612](https://github.com/mastra-ai/mastra/pull/13612))
|
|
8
|
+
|
|
9
|
+
Introduces new metrics and structured logging contexts as standalone features:
|
|
10
|
+
|
|
11
|
+
**Automatic metrics** — New auto-extracted metrics emit duration and count metrics for agent runs, tool calls, and workflows with structured labels, removing the need for manual instrumentation.
|
|
12
|
+
|
|
13
|
+
**Structured logging** — New LoggerContext provides trace-correlated logging, automatically linking logs to their parent traces and spans for easier debugging across agents and workflows.
|
|
14
|
+
|
|
15
|
+
**Cardinality protection** — New CardinalityFilter prevents high-cardinality labels from overwhelming metric backends.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`504fc8b`](https://github.com/mastra-ai/mastra/commit/504fc8b9d0ddab717577ad3bf9c95ea4bd5377bd), [`f9c150b`](https://github.com/mastra-ai/mastra/commit/f9c150b7595ad05ad9cc9a11098e2944361e8c22), [`88de7e8`](https://github.com/mastra-ai/mastra/commit/88de7e8dfe4b7e1951a9e441bb33136e705ce24e), [`edee4b3`](https://github.com/mastra-ai/mastra/commit/edee4b37dff0af515fc7cc0e8d71ee39e6a762f0), [`3790c75`](https://github.com/mastra-ai/mastra/commit/3790c7578cc6a47d854eb12d89e6b1912867fe29), [`e7a235b`](https://github.com/mastra-ai/mastra/commit/e7a235be6472e0c870ed6c791ddb17c492dc188b), [`d51d298`](https://github.com/mastra-ai/mastra/commit/d51d298953967aab1f58ec965b644d109214f085), [`6dbeeb9`](https://github.com/mastra-ai/mastra/commit/6dbeeb94a8b1eebb727300d1a98961f882180794), [`d5f0d8d`](https://github.com/mastra-ai/mastra/commit/d5f0d8d6a03e515ddaa9b5da19b7e44b8357b07b), [`09c3b18`](https://github.com/mastra-ai/mastra/commit/09c3b1802ff14e243a8a8baea327440bc8cc2e32), [`b896379`](https://github.com/mastra-ai/mastra/commit/b8963791c6afa79484645fcec596a201f936b9a2), [`85c84eb`](https://github.com/mastra-ai/mastra/commit/85c84ebb78aebfcba9d209c8e152b16d7a00cb71), [`a89272a`](https://github.com/mastra-ai/mastra/commit/a89272a5d71939b9fcd284e6a6dc1dd091a6bdcf), [`ee9c8df`](https://github.com/mastra-ai/mastra/commit/ee9c8df644f19d055af5f496bf4942705f5a47b7), [`77b4a25`](https://github.com/mastra-ai/mastra/commit/77b4a254e51907f8ff3a3ba95596a18e93ae4b35), [`276246e`](https://github.com/mastra-ai/mastra/commit/276246e0b9066a1ea48bbc70df84dbe528daaf99), [`08ecfdb`](https://github.com/mastra-ai/mastra/commit/08ecfdbdad6fb8285deef86a034bdf4a6047cfca), [`d5f628c`](https://github.com/mastra-ai/mastra/commit/d5f628ca86c6f6f3ff1035d52f635df32dd81cab), [`524c0f3`](https://github.com/mastra-ai/mastra/commit/524c0f3c434c3d9d18f66338dcef383d6161b59c), [`c18a0e9`](https://github.com/mastra-ai/mastra/commit/c18a0e9cef1e4ca004b2963d35e4cfc031971eac), [`4bd21ea`](https://github.com/mastra-ai/mastra/commit/4bd21ea43d44d0a0427414fc047577f9f0aa3bec), [`115a7a4`](https://github.com/mastra-ai/mastra/commit/115a7a47db5e9896fec12ae6507501adb9ec89bf), [`22a48ae`](https://github.com/mastra-ai/mastra/commit/22a48ae2513eb54d8d79dad361fddbca97a155e8), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`7edf78f`](https://github.com/mastra-ai/mastra/commit/7edf78f80422c43e84585f08ba11df0d4d0b73c5), [`1c4221c`](https://github.com/mastra-ai/mastra/commit/1c4221cf6032ec98d0e094d4ee11da3e48490d96), [`d25b9ea`](https://github.com/mastra-ai/mastra/commit/d25b9eabd400167255a97b690ffbc4ee4097ded5), [`fe1ce5c`](https://github.com/mastra-ai/mastra/commit/fe1ce5c9211c03d561606fda95cbfe7df1d9a9b5), [`b03c0e0`](https://github.com/mastra-ai/mastra/commit/b03c0e0389a799523929a458b0509c9e4244d562), [`0a8366b`](https://github.com/mastra-ai/mastra/commit/0a8366b0a692fcdde56c4d526e4cf03c502ae4ac), [`85664e9`](https://github.com/mastra-ai/mastra/commit/85664e9fd857320fbc245e301f764f45f66f32a3), [`bc79650`](https://github.com/mastra-ai/mastra/commit/bc796500c6e0334faa158a96077e3fb332274869), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`3a3a59e`](https://github.com/mastra-ai/mastra/commit/3a3a59e8ffaa6a985fe3d9a126a3f5ade11a6724), [`3108d4e`](https://github.com/mastra-ai/mastra/commit/3108d4e649c9fddbf03253a6feeb388a5fa9fa5a), [`0c33b2c`](https://github.com/mastra-ai/mastra/commit/0c33b2c9db537f815e1c59e2c898ffce2e395a79), [`191e5bd`](https://github.com/mastra-ai/mastra/commit/191e5bd29b82f5bda35243945790da7bc7b695c2), [`f77cd94`](https://github.com/mastra-ai/mastra/commit/f77cd94c44eabed490384e7d19232a865e13214c), [`e8135c7`](https://github.com/mastra-ai/mastra/commit/e8135c7e300dac5040670eec7eab896ac6092e30), [`daca48f`](https://github.com/mastra-ai/mastra/commit/daca48f0fb17b7ae0b62a2ac40cf0e491b2fd0b7), [`257d14f`](https://github.com/mastra-ai/mastra/commit/257d14faca5931f2e4186fc165b6f0b1f915deee), [`352f25d`](https://github.com/mastra-ai/mastra/commit/352f25da316b24cdd5b410fd8dddf6a8b763da2a), [`93477d0`](https://github.com/mastra-ai/mastra/commit/93477d0769b8a13ea5ed73d508d967fb23eaeed9), [`31c78b3`](https://github.com/mastra-ai/mastra/commit/31c78b3eb28f58a8017f1dcc795c33214d87feac), [`0bc0720`](https://github.com/mastra-ai/mastra/commit/0bc07201095791858087cc56f353fcd65e87ab54), [`36516ac`](https://github.com/mastra-ai/mastra/commit/36516aca1021cbeb42e74751b46a2614101f37c8), [`e947652`](https://github.com/mastra-ai/mastra/commit/e9476527fdecb4449e54570e80dfaf8466901254), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`ec248f6`](https://github.com/mastra-ai/mastra/commit/ec248f6b56e8a037c066c49b2178e2507471d988)]:
|
|
20
|
+
- @mastra/core@1.9.0-alpha.0
|
|
21
|
+
|
|
22
|
+
## 1.2.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Fixed telemetry spans being silently dropped when the default exporter was used. The exporter now holds spans in memory until initialization completes, ensuring all spans are propagated to your tracing backend. ([#12936](https://github.com/mastra-ai/mastra/pull/12936))
|
|
27
|
+
|
|
28
|
+
- Fixed `keysToStrip.has is not a function` crash in `deepClean()` when bundlers transform `new Set([...])` into a plain object or array. This affected agents with memory deployed to Mastra Cloud. ([#13322](https://github.com/mastra-ai/mastra/pull/13322))
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [[`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`47892c8`](https://github.com/mastra-ai/mastra/commit/47892c85708eac348209f99f10f9a5f5267e11c0), [`45bb78b`](https://github.com/mastra-ai/mastra/commit/45bb78b70bd9db29678fe49476cd9f4ed01bfd0b), [`70eef84`](https://github.com/mastra-ai/mastra/commit/70eef84b8f44493598fdafa2980a0e7283415eda), [`d84e52d`](https://github.com/mastra-ai/mastra/commit/d84e52d0f6511283ddd21ed5fe7f945449d0f799), [`24b80af`](https://github.com/mastra-ai/mastra/commit/24b80af87da93bb84d389340181e17b7477fa9ca), [`608e156`](https://github.com/mastra-ai/mastra/commit/608e156def954c9604c5e3f6d9dfce3bcc7aeab0), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`59d30b5`](https://github.com/mastra-ai/mastra/commit/59d30b5d0cb44ea7a1c440e7460dfb57eac9a9b5), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`c204b63`](https://github.com/mastra-ai/mastra/commit/c204b632d19e66acb6d6e19b11c4540dd6ad5380), [`742a417`](https://github.com/mastra-ai/mastra/commit/742a417896088220a3b5560c354c45c5ca6d88b9)]:
|
|
31
|
+
- @mastra/core@1.6.0
|
|
32
|
+
|
|
3
33
|
## 1.2.1-alpha.0
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/LICENSE.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
Portions of this software are licensed as follows:
|
|
2
|
+
|
|
3
|
+
- All content that resides under any directory named "ee/" within this
|
|
4
|
+
repository, including but not limited to:
|
|
5
|
+
- `packages/core/src/auth/ee/`
|
|
6
|
+
- `packages/server/src/server/auth/ee/`
|
|
7
|
+
is licensed under the license defined in `ee/LICENSE`.
|
|
8
|
+
|
|
9
|
+
- All third-party components incorporated into the Mastra Software are
|
|
10
|
+
licensed under the original license provided by the owner of the
|
|
11
|
+
applicable component.
|
|
12
|
+
|
|
13
|
+
- Content outside of the above-mentioned directories or restrictions is
|
|
14
|
+
available under the "Apache License 2.0" as defined below.
|
|
15
|
+
|
|
1
16
|
# Apache License 2.0
|
|
2
17
|
|
|
3
18
|
Copyright (c) 2025 Kepler Software, Inc.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mastra Observability
|
|
2
2
|
|
|
3
|
-
Tracing and
|
|
3
|
+
Tracing, metrics, and structured logging for AI operations in Mastra.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -38,6 +38,36 @@ export const mastra = new Mastra({
|
|
|
38
38
|
- **Span Processors** - Transform or filter span data before export
|
|
39
39
|
- **OpenTelemetry Compatible** - Standard trace/span ID formats for integration
|
|
40
40
|
|
|
41
|
+
## Architecture
|
|
42
|
+
|
|
43
|
+
### ObservabilityBus
|
|
44
|
+
|
|
45
|
+
Central event router that dispatches tracing, metric, and log events to registered exporters. All handler promises are tracked for reliable flush and shutdown — no events are silently dropped.
|
|
46
|
+
|
|
47
|
+
Exporters register via `registerExporter()` and can optionally implement `onLogEvent` and `onMetricEvent` handlers alongside the existing `exportTracingEvent`.
|
|
48
|
+
|
|
49
|
+
### Auto-extracted metrics
|
|
50
|
+
|
|
51
|
+
Metrics are automatically extracted from span lifecycle events by `AutoExtractedMetrics`:
|
|
52
|
+
|
|
53
|
+
- `mastra_agent_runs_started` / `mastra_agent_runs_ended` / `mastra_agent_duration_ms`
|
|
54
|
+
- `mastra_tool_calls_started` / `mastra_tool_calls_ended` / `mastra_tool_duration_ms`
|
|
55
|
+
- `mastra_model_requests_started` / `mastra_model_requests_ended` / `mastra_model_duration_ms`
|
|
56
|
+
- `mastra_model_input_tokens` / `mastra_model_output_tokens` / `mastra_model_cache_read_tokens` / `mastra_model_cache_write_tokens`
|
|
57
|
+
- `mastra_workflow_runs_started` / `mastra_workflow_runs_ended` / `mastra_workflow_duration_ms`
|
|
58
|
+
- `mastra_scores_total` (from score events)
|
|
59
|
+
- `mastra_feedback_total` (from feedback events)
|
|
60
|
+
|
|
61
|
+
Auto-extracted metrics carry labels: `entity_type`, `entity_name`, `status` (on `_ended` metrics), plus `model` and `provider` on model generation spans.
|
|
62
|
+
|
|
63
|
+
### Structured logging
|
|
64
|
+
|
|
65
|
+
`LoggerContextImpl` emits log events with automatic trace correlation (traceId, spanId), inherited tags, and entity metadata. Supports minimum log level filtering (debug/info/warn/error/fatal).
|
|
66
|
+
|
|
67
|
+
### Metrics context
|
|
68
|
+
|
|
69
|
+
`MetricsContextImpl` provides counter, gauge, and histogram instruments. All labels pass through a `CardinalityFilter` that blocks high-cardinality keys (trace_id, user_id, etc.) to protect metric backends.
|
|
70
|
+
|
|
41
71
|
## Span Types
|
|
42
72
|
|
|
43
73
|
- `WORKFLOW_RUN` - Workflow execution
|
|
@@ -49,6 +79,37 @@ export const mastra = new Mastra({
|
|
|
49
79
|
- `PROCESSOR_RUN` - Processor execution
|
|
50
80
|
- `GENERIC` - Custom operations
|
|
51
81
|
|
|
82
|
+
## Metrics Labels
|
|
83
|
+
|
|
84
|
+
### Auto-extracted metric labels
|
|
85
|
+
|
|
86
|
+
| Label | Description | Cardinality |
|
|
87
|
+
| ------------- | -------------------------------------------------------------------- | --------------------------- |
|
|
88
|
+
| `entity_type` | What is being measured (e.g., `agent`, `tool`, `workflow_run`) | Small enum (~9 values) |
|
|
89
|
+
| `entity_name` | Name of the entity (e.g., `researcher`, `search`) | Bounded by defined entities |
|
|
90
|
+
| `model` | LLM model ID (only on model generation spans) | Bounded by LLM providers |
|
|
91
|
+
| `provider` | LLM provider (only on model generation spans) | Bounded by LLM providers |
|
|
92
|
+
| `status` | Outcome of the operation (`ok` or `error`), on `_ended` metrics only | 2 values |
|
|
93
|
+
|
|
94
|
+
### User-emitted metric labels (via MetricsContext)
|
|
95
|
+
|
|
96
|
+
User-emitted metrics inherit additional context labels from the active span:
|
|
97
|
+
|
|
98
|
+
| Label | Description | Cardinality |
|
|
99
|
+
| -------------- | --------------------------------------------------------------------------- | --------------------------- |
|
|
100
|
+
| `parent_type` | Entity type of the nearest parent | Same small enum |
|
|
101
|
+
| `parent_name` | Name of the nearest parent entity | Bounded by defined entities |
|
|
102
|
+
| `root_type` | Entity type of the outermost ancestor (only set when different from parent) | Same small enum |
|
|
103
|
+
| `root_name` | Name of the outermost ancestor entity | Bounded by defined entities |
|
|
104
|
+
| `service_name` | Service name from observability config | Single value per deployment |
|
|
105
|
+
|
|
106
|
+
### Common query patterns
|
|
107
|
+
|
|
108
|
+
- **Which agent is expensive?** → group by `entity_name` where `entity_type=agent`
|
|
109
|
+
- **Why is this tool slow only sometimes?** → group by `parent_name`
|
|
110
|
+
- **What's the total cost of this user-facing flow?** → group by `root_name`
|
|
111
|
+
- **Which model is cheapest for this agent?** → group by `model` where `entity_name=X`
|
|
112
|
+
|
|
52
113
|
## Documentation
|
|
53
114
|
|
|
54
115
|
For configuration options, exporters, sampling strategies, and more, see the [full documentation](https://mastra.ai/docs/v1/observability/overview).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BaseObservabilityEventBus - Generic event bus for observability events.
|
|
3
|
+
*
|
|
4
|
+
* Provides a synchronous pub/sub mechanism:
|
|
5
|
+
* - Events are dispatched to subscribers immediately on emit()
|
|
6
|
+
* - Graceful error handling (handler errors don't break other handlers)
|
|
7
|
+
* - flush() awaits any in-flight async subscriber promises
|
|
8
|
+
* - Clean shutdown flushes then clears subscribers
|
|
9
|
+
*
|
|
10
|
+
* Buffering/batching is intentionally NOT done here — individual exporters
|
|
11
|
+
* own their own batching strategy (e.g. CloudExporter batches uploads).
|
|
12
|
+
*/
|
|
13
|
+
import { MastraBase } from '@mastra/core/base';
|
|
14
|
+
import type { ObservabilityEventBus } from '@mastra/core/observability';
|
|
15
|
+
export declare class BaseObservabilityEventBus<TEvent> extends MastraBase implements ObservabilityEventBus<TEvent> {
|
|
16
|
+
private subscribers;
|
|
17
|
+
/** In-flight async subscriber promises. Self-cleaning via .finally(). */
|
|
18
|
+
private pendingSubscribers;
|
|
19
|
+
constructor({ name }?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Dispatch an event to all subscribers synchronously.
|
|
24
|
+
* Async handler promises are tracked internally and drained by {@link flush}.
|
|
25
|
+
*
|
|
26
|
+
* @param event - The event to broadcast to subscribers.
|
|
27
|
+
*/
|
|
28
|
+
emit(event: TEvent): void;
|
|
29
|
+
/**
|
|
30
|
+
* Register a handler to receive future events.
|
|
31
|
+
*
|
|
32
|
+
* @param handler - Callback invoked synchronously on each {@link emit}.
|
|
33
|
+
* @returns An unsubscribe function that removes the handler.
|
|
34
|
+
*/
|
|
35
|
+
subscribe(handler: (event: TEvent) => void): () => void;
|
|
36
|
+
/** Max flush drain iterations before bailing — prevents infinite loops when handlers re-emit. */
|
|
37
|
+
private static readonly MAX_FLUSH_ITERATIONS;
|
|
38
|
+
/** Await all in-flight async subscriber promises, draining until empty. */
|
|
39
|
+
flush(): Promise<void>;
|
|
40
|
+
/** Flush pending promises, then clear all subscribers. */
|
|
41
|
+
shutdown(): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/bus/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,qBAAa,yBAAyB,CAAC,MAAM,CAAE,SAAQ,UAAW,YAAW,qBAAqB,CAAC,MAAM,CAAC;IACxG,OAAO,CAAC,WAAW,CAA2C;IAE9D,yEAAyE;IACzE,OAAO,CAAC,kBAAkB,CAAiC;gBAE/C,EAAE,IAAI,EAAE,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO;IAI5C;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAmBzB;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAOvD,iGAAiG;IACjG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAK;IAEjD,2EAA2E;IACrE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAe5B,0DAA0D;IACpD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAIhC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observability Event Bus
|
|
3
|
+
*/
|
|
4
|
+
export { BaseObservabilityEventBus } from './base.js';
|
|
5
|
+
export { ObservabilityBus } from './observability-bus.js';
|
|
6
|
+
export { routeToHandler, type ObservabilityHandler } from './route-event.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bus/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObservabilityBus - Unified event bus for all observability signals.
|
|
3
|
+
*
|
|
4
|
+
* Routes events to registered exporters and an optional bridge based on event
|
|
5
|
+
* type. Each handler declares which signals it supports by implementing the
|
|
6
|
+
* corresponding method (onTracingEvent, onLogEvent, onMetricEvent,
|
|
7
|
+
* onScoreEvent, onFeedbackEvent).
|
|
8
|
+
*
|
|
9
|
+
* Handler presence = signal support. If a handler does not implement a method,
|
|
10
|
+
* events of that type are silently skipped for that handler.
|
|
11
|
+
*/
|
|
12
|
+
import type { ObservabilityExporter, ObservabilityBridge, ObservabilityEvent } from '@mastra/core/observability';
|
|
13
|
+
import type { CardinalityFilter } from '../metrics/cardinality.js';
|
|
14
|
+
import { BaseObservabilityEventBus } from './base.js';
|
|
15
|
+
export declare class ObservabilityBus extends BaseObservabilityEventBus<ObservabilityEvent> {
|
|
16
|
+
private exporters;
|
|
17
|
+
private bridge?;
|
|
18
|
+
private autoExtractor?;
|
|
19
|
+
/** In-flight handler promises from routeToHandler. Self-cleaning via .finally(). */
|
|
20
|
+
private pendingHandlers;
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Enable auto-extraction of metrics from tracing, score, and feedback events.
|
|
24
|
+
* When enabled, span lifecycle events automatically generate counter/histogram
|
|
25
|
+
* metrics (e.g., mastra_agent_runs_started, mastra_model_duration_ms).
|
|
26
|
+
*
|
|
27
|
+
* No-ops if auto-extraction is already enabled.
|
|
28
|
+
*
|
|
29
|
+
* @param cardinalityFilter - Optional filter applied to auto-extracted metric labels.
|
|
30
|
+
*/
|
|
31
|
+
enableAutoExtractedMetrics(cardinalityFilter?: CardinalityFilter): void;
|
|
32
|
+
/**
|
|
33
|
+
* Register an exporter to receive routed events.
|
|
34
|
+
* Duplicate registrations (same instance) are silently ignored.
|
|
35
|
+
*
|
|
36
|
+
* @param exporter - The exporter to register.
|
|
37
|
+
*/
|
|
38
|
+
registerExporter(exporter: ObservabilityExporter): void;
|
|
39
|
+
/**
|
|
40
|
+
* Unregister an exporter.
|
|
41
|
+
*
|
|
42
|
+
* @param exporter - The exporter instance to remove.
|
|
43
|
+
* @returns `true` if the exporter was found and removed, `false` otherwise.
|
|
44
|
+
*/
|
|
45
|
+
unregisterExporter(exporter: ObservabilityExporter): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Get registered exporters (read-only snapshot).
|
|
48
|
+
*/
|
|
49
|
+
getExporters(): readonly ObservabilityExporter[];
|
|
50
|
+
/**
|
|
51
|
+
* Register a bridge to receive all routed events alongside exporters.
|
|
52
|
+
* Only one bridge can be registered at a time; replacing an existing bridge
|
|
53
|
+
* logs a warning.
|
|
54
|
+
*
|
|
55
|
+
* @param bridge - The bridge to register.
|
|
56
|
+
*/
|
|
57
|
+
registerBridge(bridge: ObservabilityBridge): void;
|
|
58
|
+
/**
|
|
59
|
+
* Unregister the bridge.
|
|
60
|
+
*
|
|
61
|
+
* @returns `true` if a bridge was registered and removed, `false` otherwise.
|
|
62
|
+
*/
|
|
63
|
+
unregisterBridge(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Get the registered bridge, if any.
|
|
66
|
+
*/
|
|
67
|
+
getBridge(): ObservabilityBridge | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Emit an event: route to exporter/bridge handlers, run auto-extraction,
|
|
70
|
+
* then forward to base class for subscriber delivery.
|
|
71
|
+
*
|
|
72
|
+
* emit() is synchronous — async handler promises are tracked internally
|
|
73
|
+
* and can be drained via flush().
|
|
74
|
+
*/
|
|
75
|
+
emit(event: ObservabilityEvent): void;
|
|
76
|
+
/**
|
|
77
|
+
* Track an async handler promise so flush() can await it.
|
|
78
|
+
* No-ops for sync (void) results.
|
|
79
|
+
*/
|
|
80
|
+
private trackPromise;
|
|
81
|
+
/**
|
|
82
|
+
* Two-phase flush to ensure all observability data is fully exported.
|
|
83
|
+
*
|
|
84
|
+
* **Phase 1 — Delivery:** Await all in-flight handler promises (exporters,
|
|
85
|
+
* bridge, and base-class subscribers). After this resolves, all event data
|
|
86
|
+
* has been delivered to handler methods.
|
|
87
|
+
*
|
|
88
|
+
* **Phase 2 — Buffer drain:** Call flush() on each exporter and bridge to
|
|
89
|
+
* drain their SDK-internal buffers (e.g., OTEL BatchSpanProcessor, Langfuse
|
|
90
|
+
* client queue). Phases are sequential — Phase 2 must not start until
|
|
91
|
+
* Phase 1 completes, otherwise exporters would flush empty buffers.
|
|
92
|
+
*/
|
|
93
|
+
flush(): Promise<void>;
|
|
94
|
+
/** Flush all pending events and exporter buffers, then clear subscribers. */
|
|
95
|
+
shutdown(): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=observability-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observability-bus.d.ts","sourceRoot":"","sources":["../../src/bus/observability-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EAInB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAenD,qBAAa,gBAAiB,SAAQ,yBAAyB,CAAC,kBAAkB,CAAC;IACjF,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,MAAM,CAAC,CAAsB;IACrC,OAAO,CAAC,aAAa,CAAC,CAAuB;IAE7C,oFAAoF;IACpF,OAAO,CAAC,eAAe,CAAiC;;IAMxD;;;;;;;;OAQG;IACH,0BAA0B,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAOvE;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAOvD;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO;IAS5D;;OAEG;IACH,YAAY,IAAI,SAAS,qBAAqB,EAAE;IAIhD;;;;;;OAMG;IACH,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAOjD;;;;OAIG;IACH,gBAAgB,IAAI,OAAO;IAQ3B;;OAEG;IACH,SAAS,IAAI,mBAAmB,GAAG,SAAS;IAI5C;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IA+BrC;;;OAGG;IACH,OAAO,CAAC,YAAY;IAQpB;;;;;;;;;;;OAWG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B5B,6EAA6E;IACvE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAIhC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared event routing logic for observability handlers (exporters and bridges).
|
|
3
|
+
*
|
|
4
|
+
* Both ObservabilityExporter and ObservabilityBridge implement the same optional
|
|
5
|
+
* signal handlers (onTracingEvent, onLogEvent, onMetricEvent, onScoreEvent,
|
|
6
|
+
* onFeedbackEvent). This module provides a single routing function used by both
|
|
7
|
+
* the ObservabilityBus (for exporters) and BaseObservabilityInstance (for bridges).
|
|
8
|
+
*/
|
|
9
|
+
import type { IMastraLogger } from '@mastra/core/logger';
|
|
10
|
+
import type { ObservabilityEvents, ObservabilityEvent } from '@mastra/core/observability';
|
|
11
|
+
/**
|
|
12
|
+
* Any handler that can receive routed observability events.
|
|
13
|
+
* Both ObservabilityExporter and ObservabilityBridge extend
|
|
14
|
+
* ObservabilityEvents, so this matches either.
|
|
15
|
+
*/
|
|
16
|
+
export type ObservabilityHandler = ObservabilityEvents & {
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Route a single event to the appropriate method on a handler.
|
|
21
|
+
*
|
|
22
|
+
* For tracing events, prefers onTracingEvent when present and falls back
|
|
23
|
+
* to exportTracingEvent. For all other signals, calls the corresponding
|
|
24
|
+
* optional handler method if the handler implements it.
|
|
25
|
+
*
|
|
26
|
+
* Returns the handler promise (if async) so callers can track it for flush().
|
|
27
|
+
* Async rejections are caught to prevent unhandled rejections.
|
|
28
|
+
* Sync throws are caught so one failing handler doesn't break others.
|
|
29
|
+
*/
|
|
30
|
+
export declare function routeToHandler(handler: ObservabilityHandler, event: ObservabilityEvent, logger: IMastraLogger): void | Promise<void>;
|
|
31
|
+
//# sourceMappingURL=route-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-event.d.ts","sourceRoot":"","sources":["../../src/bus/route-event.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,mBAAmB,EAMnB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAGpC;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,aAAa,GACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoggerContextImpl - Structured logging with automatic trace correlation.
|
|
3
|
+
*
|
|
4
|
+
* Emits LogEvent to the ObservabilityBus. All context (traceId, spanId,
|
|
5
|
+
* tags, metadata) is snapshotted at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { LogLevel, LoggerContext } from '@mastra/core/observability';
|
|
8
|
+
import type { ObservabilityBus } from '../bus/index.js';
|
|
9
|
+
export interface LoggerContextConfig {
|
|
10
|
+
/** Trace ID for log correlation */
|
|
11
|
+
traceId?: string;
|
|
12
|
+
/** Span ID for log correlation */
|
|
13
|
+
spanId?: string;
|
|
14
|
+
/** Tags for filtering/categorization */
|
|
15
|
+
tags?: string[];
|
|
16
|
+
/** Metadata (entity context, runId, environment, serviceName, etc.) */
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
/** Bus for event emission */
|
|
19
|
+
observabilityBus: ObservabilityBus;
|
|
20
|
+
/** Minimum log level (logs below this are discarded) */
|
|
21
|
+
minLevel?: LogLevel;
|
|
22
|
+
}
|
|
23
|
+
export declare class LoggerContextImpl implements LoggerContext {
|
|
24
|
+
private config;
|
|
25
|
+
/**
|
|
26
|
+
* Create a logger context. Tags and metadata are defensively copied so
|
|
27
|
+
* mutations after construction do not affect emitted logs.
|
|
28
|
+
*/
|
|
29
|
+
constructor(config: LoggerContextConfig);
|
|
30
|
+
/** Log at DEBUG level. */
|
|
31
|
+
debug(message: string, data?: Record<string, unknown>): void;
|
|
32
|
+
/** Log at INFO level. */
|
|
33
|
+
info(message: string, data?: Record<string, unknown>): void;
|
|
34
|
+
/** Log at WARN level. */
|
|
35
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
36
|
+
/** Log at ERROR level. */
|
|
37
|
+
error(message: string, data?: Record<string, unknown>): void;
|
|
38
|
+
/** Log at FATAL level. */
|
|
39
|
+
fatal(message: string, data?: Record<string, unknown>): void;
|
|
40
|
+
/**
|
|
41
|
+
* Build an ExportedLog, check against the minimum level, and emit it through the bus.
|
|
42
|
+
*/
|
|
43
|
+
private log;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/context/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAyB,MAAM,4BAA4B,CAAC;AAEjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC,6BAA6B;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAWD,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,MAAM,CAAsB;IAEpC;;;OAGG;gBACS,MAAM,EAAE,mBAAmB;IAQvC,0BAA0B;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI5D,yBAAyB;IACzB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI3D,yBAAyB;IACzB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI3D,0BAA0B;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI5D,0BAA0B;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI5D;;OAEG;IACH,OAAO,CAAC,GAAG;CAoBZ"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MetricsContextImpl - Metric emission with cardinality protection.
|
|
3
|
+
*
|
|
4
|
+
* Provides counter, gauge, and histogram instrument creation.
|
|
5
|
+
* All metrics pass through cardinality filtering before emission.
|
|
6
|
+
* Context labels are snapshotted at construction time.
|
|
7
|
+
*/
|
|
8
|
+
import type { MetricsContext, Counter, Gauge, Histogram } from '@mastra/core/observability';
|
|
9
|
+
import type { ObservabilityBus } from '../bus/index.js';
|
|
10
|
+
import type { CardinalityFilter } from '../metrics/cardinality.js';
|
|
11
|
+
export interface MetricsContextConfig {
|
|
12
|
+
/** Base labels merged into every emitted metric (entity context, model, provider, serviceName, etc.) */
|
|
13
|
+
labels?: Record<string, string>;
|
|
14
|
+
/** Bus for event emission */
|
|
15
|
+
observabilityBus: ObservabilityBus;
|
|
16
|
+
/** Cardinality filter applied to all labels */
|
|
17
|
+
cardinalityFilter: CardinalityFilter;
|
|
18
|
+
}
|
|
19
|
+
export declare class MetricsContextImpl implements MetricsContext {
|
|
20
|
+
private config;
|
|
21
|
+
/**
|
|
22
|
+
* Create a metrics context. Base labels are defensively copied so
|
|
23
|
+
* mutations after construction do not affect emitted metrics.
|
|
24
|
+
*/
|
|
25
|
+
constructor(config: MetricsContextConfig);
|
|
26
|
+
/**
|
|
27
|
+
* Create a counter instrument. Call `.add(value)` to increment.
|
|
28
|
+
*
|
|
29
|
+
* @param name - Metric name (e.g. `mastra_custom_requests_total`).
|
|
30
|
+
*/
|
|
31
|
+
counter(name: string): Counter;
|
|
32
|
+
/**
|
|
33
|
+
* Create a gauge instrument. Call `.set(value)` to record a point-in-time value.
|
|
34
|
+
*
|
|
35
|
+
* @param name - Metric name (e.g. `mastra_queue_depth`).
|
|
36
|
+
*/
|
|
37
|
+
gauge(name: string): Gauge;
|
|
38
|
+
/**
|
|
39
|
+
* Create a histogram instrument. Call `.record(value)` to observe a measurement.
|
|
40
|
+
*
|
|
41
|
+
* @param name - Metric name (e.g. `mastra_request_duration_ms`).
|
|
42
|
+
*/
|
|
43
|
+
histogram(name: string): Histogram;
|
|
44
|
+
/** Merge base + additional labels, apply cardinality filtering, and emit a MetricEvent. Non-finite values are silently dropped. */
|
|
45
|
+
private emit;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/context/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,KAAK,EACL,SAAS,EAIV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACnC,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC,6BAA6B;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,+CAA+C;IAC/C,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,qBAAa,kBAAmB,YAAW,cAAc;IACvD,OAAO,CAAC,MAAM,CAAuB;IAErC;;;OAGG;gBACS,MAAM,EAAE,oBAAoB;IAOxC;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAQ9B;;;;OAIG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAQ1B;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAQlC,mIAAmI;IACnI,OAAO,CAAC,IAAI;CAoBb"}
|
package/dist/exporters/base.d.ts
CHANGED
|
@@ -112,6 +112,17 @@ export declare abstract class BaseExporter implements ObservabilityExporter {
|
|
|
112
112
|
* @returns The (possibly modified) event to process
|
|
113
113
|
*/
|
|
114
114
|
protected applySpanFormatter(event: TracingEvent): Promise<TracingEvent>;
|
|
115
|
+
/**
|
|
116
|
+
* Default onTracingEvent handler that delegates to exportTracingEvent.
|
|
117
|
+
*
|
|
118
|
+
* This provides backward compatibility: existing exporters that only implement
|
|
119
|
+
* _exportTracingEvent will automatically receive tracing events routed through
|
|
120
|
+
* the ObservabilityBus. Subclasses can override this if they need different
|
|
121
|
+
* routing behavior for bus-delivered events.
|
|
122
|
+
*
|
|
123
|
+
* Handler presence on ObservabilityExporter = signal support.
|
|
124
|
+
*/
|
|
125
|
+
onTracingEvent(event: TracingEvent): void | Promise<void>;
|
|
115
126
|
/**
|
|
116
127
|
* Export a tracing event
|
|
117
128
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/exporters/base.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC1D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,8BAAsB,YAAa,YAAW,qBAAqB;;IACjE,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,6BAA6B;IAC7B,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;IAEhC,oDAAoD;IACpD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IAKlD,uCAAuC;IACvC,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;gBACS,MAAM,GAAE,kBAAuB;IAQ3C;;OAEG;IACH,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAMxC;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK3C;;;;;;;;;OASG;cACa,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB9E;;;;;;OAMG;IACG,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1E;;OAEG;IACH,IAAI,CAAC,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAE1C;;OAEG;IACH,eAAe,CAAC,CAAC,KAAK,EAAE;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChC,GAAG,OAAO,CAAC,IAAI,CAAC;IAEjB;;;;;;;;OAQG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/exporters/base.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC1D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,8BAAsB,YAAa,YAAW,qBAAqB;;IACjE,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,6BAA6B;IAC7B,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;IAEhC,oDAAoD;IACpD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IAKlD,uCAAuC;IACvC,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;gBACS,MAAM,GAAE,kBAAuB;IAQ3C;;OAEG;IACH,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAMxC;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK3C;;;;;;;;;OASG;cACa,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB9E;;;;;;;;;OASG;IACH,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;;;;;OAMG;IACG,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1E;;OAEG;IACH,IAAI,CAAC,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAE1C;;OAEG;IACH,eAAe,CAAC,CAAC,KAAK,EAAE;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChC,GAAG,OAAO,CAAC,IAAI,CAAC;IAEjB;;;;;;;;OAQG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exporters/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAG3B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exporters/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAG3B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|