@mastra/loggers 1.0.0 → 1.0.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/CHANGELOG.md +18 -0
- package/dist/docs/README.md +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/SOURCE_MAP.json +1 -1
- package/dist/docs/core/01-reference.md +1 -1
- package/dist/docs/logging/01-reference.md +1 -1
- package/dist/docs/observability/01-overview.md +13 -4
- package/dist/docs/observability/02-logging.md +3 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/loggers
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Force alpha version bump for @mastra/evals, @mastra/loggers, @mastra/observability, and @mastra/memory ([#12505](https://github.com/mastra-ai/mastra/pull/12505))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`90fc0e5`](https://github.com/mastra-ai/mastra/commit/90fc0e5717cb280c2d4acf4f0410b510bb4c0a72), [`1cf5d2e`](https://github.com/mastra-ai/mastra/commit/1cf5d2ea1b085be23e34fb506c80c80a4e6d9c2b), [`b99ceac`](https://github.com/mastra-ai/mastra/commit/b99ceace2c830dbdef47c8692d56a91954aefea2), [`deea43e`](https://github.com/mastra-ai/mastra/commit/deea43eb1366d03a864c5e597d16a48592b9893f), [`833ae96`](https://github.com/mastra-ai/mastra/commit/833ae96c3e34370e58a1e979571c41f39a720592), [`943772b`](https://github.com/mastra-ai/mastra/commit/943772b4378f625f0f4e19ea2b7c392bd8e71786), [`b5c711b`](https://github.com/mastra-ai/mastra/commit/b5c711b281dd1fb81a399a766bc9f86c55efc13e), [`3efbe5a`](https://github.com/mastra-ai/mastra/commit/3efbe5ae20864c4f3143457f4f3ee7dc2fa5ca76), [`1e49e7a`](https://github.com/mastra-ai/mastra/commit/1e49e7ab5f173582154cb26b29d424de67d09aef), [`751eaab`](https://github.com/mastra-ai/mastra/commit/751eaab4e0d3820a94e4c3d39a2ff2663ded3d91), [`69d8156`](https://github.com/mastra-ai/mastra/commit/69d81568bcf062557c24471ce26812446bec465d), [`60d9d89`](https://github.com/mastra-ai/mastra/commit/60d9d899e44b35bc43f1bcd967a74e0ce010b1af), [`5c544c8`](https://github.com/mastra-ai/mastra/commit/5c544c8d12b08ab40d64d8f37b3c4215bee95b87), [`771ad96`](https://github.com/mastra-ai/mastra/commit/771ad962441996b5c43549391a3e6a02c6ddedc2), [`2b0936b`](https://github.com/mastra-ai/mastra/commit/2b0936b0c9a43eeed9bef63e614d7e02ee803f7e), [`3b04f30`](https://github.com/mastra-ai/mastra/commit/3b04f3010604f3cdfc8a0674731700ad66471cee), [`97e26de`](https://github.com/mastra-ai/mastra/commit/97e26deaebd9836647a67b96423281d66421ca07), [`ac9ec66`](https://github.com/mastra-ai/mastra/commit/ac9ec6672779b2e6d4344e415481d1a6a7d4911a), [`10523f4`](https://github.com/mastra-ai/mastra/commit/10523f4882d9b874b40ce6e3715f66dbcd4947d2), [`cb72d20`](https://github.com/mastra-ai/mastra/commit/cb72d2069d7339bda8a0e76d4f35615debb07b84), [`42856b1`](https://github.com/mastra-ai/mastra/commit/42856b1c8aeea6371c9ee77ae2f5f5fe34400933), [`66f33ff`](https://github.com/mastra-ai/mastra/commit/66f33ff68620018513e499c394411d1d39b3aa5c), [`ab3c190`](https://github.com/mastra-ai/mastra/commit/ab3c1901980a99910ca9b96a7090c22e24060113), [`d4f06c8`](https://github.com/mastra-ai/mastra/commit/d4f06c85ffa5bb0da38fb82ebf3b040cc6b4ec4e), [`0350626`](https://github.com/mastra-ai/mastra/commit/03506267ec41b67add80d994c0c0fcce93bbc75f), [`bc9fa00`](https://github.com/mastra-ai/mastra/commit/bc9fa00859c5c4a796d53a0a5cae46ab4a3072e4), [`f46a478`](https://github.com/mastra-ai/mastra/commit/f46a4782f595949c696569e891f81c8d26338508), [`90fc0e5`](https://github.com/mastra-ai/mastra/commit/90fc0e5717cb280c2d4acf4f0410b510bb4c0a72), [`f05a3a5`](https://github.com/mastra-ai/mastra/commit/f05a3a5cf2b9a9c2d40c09cb8c762a4b6cd5d565), [`a291da9`](https://github.com/mastra-ai/mastra/commit/a291da9363efd92dafd8775dccb4f2d0511ece7a), [`c5d71da`](https://github.com/mastra-ai/mastra/commit/c5d71da1c680ce5640b1a7f8ca0e024a4ab1cfed), [`07042f9`](https://github.com/mastra-ai/mastra/commit/07042f9f89080f38b8f72713ba1c972d5b1905b8), [`0423442`](https://github.com/mastra-ai/mastra/commit/0423442b7be2dfacba95890bea8f4a810db4d603)]:
|
|
10
|
+
- @mastra/core@1.1.0
|
|
11
|
+
|
|
12
|
+
## 1.0.1-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Force alpha version bump for @mastra/evals, @mastra/loggers, @mastra/observability, and @mastra/memory ([#12505](https://github.com/mastra-ai/mastra/pull/12505))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies:
|
|
19
|
+
- @mastra/core@1.1.0-alpha.2
|
|
20
|
+
|
|
3
21
|
## 1.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
package/dist/docs/README.md
CHANGED
package/dist/docs/SKILL.md
CHANGED
|
@@ -38,4 +38,4 @@ export const mastra = new Mastra({
|
|
|
38
38
|
|
|
39
39
|
## Constructor parameters
|
|
40
40
|
|
|
41
|
-
Visit the [Configuration reference](https://mastra.ai/reference/
|
|
41
|
+
Visit the [Configuration reference](https://mastra.ai/reference/configuration) for detailed documentation on all available configuration options.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
A Logger instance is created using `new PinoLogger()` and provides methods to record events at various severity levels.
|
|
13
13
|
|
|
14
|
-
When deploying to Mastra Cloud, logs are displayed on the [Logs](https://mastra.ai/docs/
|
|
14
|
+
When deploying to Mastra Cloud, logs are displayed on the [Logs](https://mastra.ai/docs/mastra-cloud/observability#logs) page. In self-hosted or custom environments, logs can be directed to files or external services depending on the configured transports.
|
|
15
15
|
|
|
16
16
|
## Usage example
|
|
17
17
|
|
|
@@ -15,6 +15,12 @@ Specialized tracing for AI operations that captures:
|
|
|
15
15
|
- **Workflow steps**: Branching logic, parallel execution, and step outputs
|
|
16
16
|
- **Automatic instrumentation**: Tracing with decorators
|
|
17
17
|
|
|
18
|
+
## Storage Requirements
|
|
19
|
+
|
|
20
|
+
The `DefaultExporter` persists traces to your configured storage backend. Not all storage providers support observability—for the full list, see [Storage Provider Support](https://mastra.ai/docs/observability/tracing/exporters/default#storage-provider-support).
|
|
21
|
+
|
|
22
|
+
For production environments with high traffic, we recommend using **ClickHouse** for the observability domain via [composite storage](https://mastra.ai/reference/storage/composite). See [Production Recommendations](https://mastra.ai/docs/observability/tracing/exporters/default#production-recommendations) for details.
|
|
23
|
+
|
|
18
24
|
## Quick Start
|
|
19
25
|
|
|
20
26
|
Configure Observability in your Mastra instance:
|
|
@@ -53,12 +59,15 @@ export const mastra = new Mastra({
|
|
|
53
59
|
});
|
|
54
60
|
```
|
|
55
61
|
|
|
62
|
+
> **Serverless environments**
|
|
63
|
+
The `file:./mastra.db` storage URL uses the local filesystem, which doesn't work in serverless environments like Vercel, AWS Lambda, or Cloudflare Workers. For serverless deployments, use external storage. See the [Vercel deployment guide](https://mastra.ai/guides/deployment/vercel-deployer#observability) for a complete example.
|
|
64
|
+
|
|
56
65
|
With this basic setup, you will see Traces and Logs in both Studio and in Mastra Cloud.
|
|
57
66
|
|
|
58
|
-
We also support various external tracing providers like MLflow, Langfuse, Braintrust, and any OpenTelemetry-compatible platform (Datadog, New Relic, SigNoz, etc.). See more about this in the [Tracing](https://mastra.ai/docs/
|
|
67
|
+
We also support various external tracing providers like MLflow, Langfuse, Braintrust, and any OpenTelemetry-compatible platform (Datadog, New Relic, SigNoz, etc.). See more about this in the [Tracing](https://mastra.ai/docs/observability/tracing/overview) documentation.
|
|
59
68
|
|
|
60
69
|
## What's Next?
|
|
61
70
|
|
|
62
|
-
- **[Set up Tracing](https://mastra.ai/docs/
|
|
63
|
-
- **[Configure Logging](https://mastra.ai/docs/
|
|
64
|
-
- **[API Reference](https://mastra.ai/reference/
|
|
71
|
+
- **[Set up Tracing](https://mastra.ai/docs/observability/tracing/overview)**: Configure tracing for your application
|
|
72
|
+
- **[Configure Logging](https://mastra.ai/docs/observability/logging)**: Add structured logging
|
|
73
|
+
- **[API Reference](https://mastra.ai/reference/observability/tracing/instances)**: Detailed configuration options
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Mastra's logging system captures function execution, input data, and output responses in a structured format.
|
|
6
6
|
|
|
7
|
-
When deploying to Mastra Cloud, logs are shown on the [Logs](https://mastra.ai/docs/
|
|
7
|
+
When deploying to Mastra Cloud, logs are shown on the [Logs](https://mastra.ai/docs/mastra-cloud/observability) page. In self-hosted or custom environments, logs can be directed to files or external services depending on the configured transports.
|
|
8
8
|
|
|
9
9
|
## Configuring logs with PinoLogger
|
|
10
10
|
|
|
11
|
-
When [initializing a new Mastra project](https://mastra.ai/guides/
|
|
11
|
+
When [initializing a new Mastra project](https://mastra.ai/guides/getting-started/quickstart) using the CLI, `PinoLogger` is included by default.
|
|
12
12
|
|
|
13
13
|
```typescript title="src/mastra/index.ts"
|
|
14
14
|
import { Mastra } from "@mastra/core/mastra";
|
|
@@ -24,7 +24,7 @@ export const mastra = new Mastra({
|
|
|
24
24
|
|
|
25
25
|
> **Note:**
|
|
26
26
|
|
|
27
|
-
Visit [PinoLogger](https://mastra.ai/reference/
|
|
27
|
+
Visit [PinoLogger](https://mastra.ai/reference/logging/pino-logger) for all available configuration options.
|
|
28
28
|
|
|
29
29
|
## Customizing logs
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/loggers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
"pino-pretty": "^13.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@types/node": "22.
|
|
72
|
+
"@types/node": "22.19.7",
|
|
73
73
|
"@vitest/coverage-v8": "4.0.12",
|
|
74
74
|
"@vitest/ui": "4.0.12",
|
|
75
75
|
"eslint": "^9.37.0",
|
|
76
|
-
"tsup": "^8.5.
|
|
76
|
+
"tsup": "^8.5.1",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
78
|
"vitest": "4.0.16",
|
|
79
|
-
"@internal/
|
|
80
|
-
"@mastra/core": "1.
|
|
81
|
-
"@internal/
|
|
79
|
+
"@internal/lint": "0.0.56",
|
|
80
|
+
"@mastra/core": "1.1.0",
|
|
81
|
+
"@internal/types-builder": "0.0.31"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|