@mastra/core 0.7.0 → 0.8.0-alpha.2
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 +76 -74
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +5 -3
- package/dist/agent/index.d.ts +5 -3
- package/dist/agent/index.js +1 -1
- package/dist/{base-Cmunaaxb.d.ts → base-BA_in99t.d.ts} +4 -1
- package/dist/{base-Cyl73WbV.d.ts → base-CQuRWXAH.d.ts} +985 -913
- package/dist/{base-ObPJ-w8K.d.cts → base-CvQbEqGB.d.cts} +4 -1
- package/dist/{base-C0wILuA9.d.cts → base-Dpt4tO56.d.cts} +985 -913
- package/dist/base.cjs +2 -2
- package/dist/base.d.cts +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.d.cts +1 -1
- package/dist/bundler/index.d.ts +1 -1
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-L7CR75HA.js → chunk-2BVZNKLX.js} +1 -1
- package/dist/{chunk-V5ORZPFW.cjs → chunk-3C6V2FEP.cjs} +1 -1
- package/dist/chunk-3HE5CJBG.cjs +4604 -0
- package/dist/{chunk-PNZK456O.js → chunk-4RMSGSQN.js} +4 -4
- package/dist/{chunk-WESJ2ZY7.cjs → chunk-57LXIDIK.cjs} +2 -2
- package/dist/chunk-5RRJEWMA.cjs +107 -0
- package/dist/{chunk-3CNO7YB5.js → chunk-5TFGORLG.js} +1 -1
- package/dist/{chunk-5FAJ6HUC.cjs → chunk-64VPB7ZD.cjs} +23 -2
- package/dist/chunk-6XLV4KSD.js +100 -0
- package/dist/{chunk-XLSROQ26.cjs → chunk-7I7AKQH3.cjs} +5 -5
- package/dist/{chunk-RUA6BSB6.cjs → chunk-7JBINHJX.cjs} +2 -2
- package/dist/chunk-A6MBM56X.js +268 -0
- package/dist/{chunk-2YF5JYTJ.js → chunk-BC5B4EGI.js} +21 -2
- package/dist/chunk-BF7ZLRGO.cjs +271 -0
- package/dist/{chunk-SMBKF6K5.js → chunk-BRBHQ6KS.js} +10 -1
- package/dist/{chunk-VN4M67DA.js → chunk-CLJQYXNM.js} +1 -1
- package/dist/{chunk-PL7PVTGF.cjs → chunk-D63P5O4Q.cjs} +4 -4
- package/dist/chunk-DCGLGWHI.cjs +141 -0
- package/dist/{chunk-YXJQFZOW.cjs → chunk-DL4QPJKI.cjs} +24 -10
- package/dist/{chunk-ZABXT2MN.js → chunk-FY57LEMC.js} +1 -1
- package/dist/{chunk-XLXJUYKH.js → chunk-GHK3HBWN.js} +1 -1
- package/dist/{chunk-ONDCHP6G.cjs → chunk-GO2D7FEK.cjs} +2 -2
- package/dist/{chunk-7VTZI3YN.js → chunk-H6ZU5N2C.js} +1 -1
- package/dist/{chunk-WBE5RTFI.js → chunk-HAWAUEWK.js} +2 -2
- package/dist/chunk-HCDXBSMK.js +4577 -0
- package/dist/{chunk-RU7CSPAV.js → chunk-JGJMVCJ4.js} +7 -84
- package/dist/{chunk-W5HVJX45.js → chunk-N5ZYOQBL.js} +46 -5
- package/dist/{chunk-NPOKIPWC.cjs → chunk-O7IW545H.cjs} +1 -1
- package/dist/{chunk-XB2TJ7LX.cjs → chunk-PHWEC4VD.cjs} +47 -6
- package/dist/{chunk-NUDAZEOG.js → chunk-PK5QRKSG.js} +1 -1
- package/dist/{chunk-43SD5CUE.js → chunk-QDHRRKQ5.js} +63 -9
- package/dist/{chunk-ZBKJDQPM.js → chunk-RBWBJC6D.js} +17 -3
- package/dist/{chunk-4PYORXWM.cjs → chunk-RXDLSCBA.cjs} +4 -4
- package/dist/{chunk-IQLRSKED.cjs → chunk-RZCYBC7D.cjs} +2 -2
- package/dist/{chunk-ASFUEC75.cjs → chunk-TNNHN4ZY.cjs} +67 -12
- package/dist/{chunk-QM6WIIPM.js → chunk-UF4LZV3D.js} +1 -1
- package/dist/{chunk-JJ4YQTFT.cjs → chunk-WAW7QBY4.cjs} +2 -2
- package/dist/{chunk-U7ONOIBO.cjs → chunk-YZDUZFVZ.cjs} +11 -2
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.d.cts +1 -1
- package/dist/deployer/index.d.ts +1 -1
- package/dist/deployer/index.js +1 -1
- package/dist/eval/index.cjs +3 -3
- package/dist/eval/index.d.cts +8 -5
- package/dist/eval/index.d.ts +8 -5
- package/dist/eval/index.js +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.cjs +102 -92
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +18 -19
- package/dist/integration/index.cjs +3 -3
- package/dist/integration/index.d.cts +5 -3
- package/dist/integration/index.d.ts +5 -3
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.d.cts +5 -3
- package/dist/llm/index.d.ts +5 -3
- package/dist/logger/index.cjs +9 -9
- package/dist/logger/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.cts +5 -3
- package/dist/mastra/index.d.ts +5 -3
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +6 -2
- package/dist/memory/index.d.cts +5 -3
- package/dist/memory/index.d.ts +5 -3
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +8 -8
- package/dist/network/index.d.cts +5 -3
- package/dist/network/index.d.ts +5 -3
- package/dist/network/index.js +4 -4
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.d.cts +10 -8
- package/dist/relevance/index.d.ts +10 -8
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +17 -0
- package/dist/server/index.d.cts +37 -0
- package/dist/server/index.d.ts +37 -0
- package/dist/server/index.js +15 -0
- package/dist/storage/index.cjs +12 -8
- package/dist/storage/index.d.cts +5 -3
- package/dist/storage/index.d.ts +5 -3
- package/dist/storage/index.js +2 -2
- package/dist/storage/libsql/index.cjs +24 -24
- package/dist/storage/libsql/index.d.cts +5 -3
- package/dist/storage/libsql/index.d.ts +5 -3
- package/dist/storage/libsql/index.js +12 -12
- package/dist/telemetry/index.cjs +6 -6
- package/dist/telemetry/index.d.cts +5 -3
- package/dist/telemetry/index.d.ts +5 -3
- package/dist/telemetry/index.js +1 -1
- package/dist/tools/index.cjs +7 -3
- package/dist/tools/index.d.cts +6 -3
- package/dist/tools/index.d.ts +6 -3
- package/dist/tools/index.js +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.d.cts +1 -1
- package/dist/tts/index.d.ts +1 -1
- package/dist/tts/index.js +1 -1
- package/dist/{types-CwTG2XyQ.d.cts → types-BtMyV38I.d.cts} +4 -1
- package/dist/{types-CwTG2XyQ.d.ts → types-BtMyV38I.d.ts} +4 -1
- package/dist/utils.cjs +13 -13
- package/dist/utils.d.cts +7 -5
- package/dist/utils.d.ts +7 -5
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/vector/libsql/index.cjs +3 -3
- package/dist/vector/libsql/index.d.cts +1 -1
- package/dist/vector/libsql/index.d.ts +1 -1
- package/dist/vector/libsql/index.js +1 -1
- package/dist/voice/index.cjs +13 -249
- package/dist/voice/index.d.cts +22 -8
- package/dist/voice/index.d.ts +22 -8
- package/dist/voice/index.js +1 -252
- package/dist/workflows/index.cjs +28 -20
- package/dist/workflows/index.d.cts +18 -7
- package/dist/workflows/index.d.ts +18 -7
- package/dist/workflows/index.js +1 -1
- package/package.json +5 -3
- package/dist/chunk-2W2GYEYQ.cjs +0 -25
- package/dist/chunk-C6BBAS4I.cjs +0 -1715
- package/dist/chunk-F5UYWPV4.cjs +0 -14
- package/dist/chunk-GG6TEAMJ.cjs +0 -2289
- package/dist/chunk-R2M5CZ5U.js +0 -2264
- package/dist/chunk-RG66XEJT.js +0 -8
- package/dist/chunk-VNQRLYIA.js +0 -1715
- package/dist/chunk-WVVKLIUW.cjs +0 -218
- package/dist/chunk-ZINPRHAN.js +0 -22
package/README.md
CHANGED
|
@@ -29,8 +29,8 @@ For comprehensive documentation, visit our [official documentation](https://mast
|
|
|
29
29
|
Agents are autonomous AI entities that can understand instructions, use tools, and complete tasks. They encapsulate LLM interactions and can maintain conversation history, use provided tools, and follow specific behavioral guidelines through instructions.
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
|
-
import { openai } from '@ai-sdk/openai';
|
|
33
32
|
import { Agent } from '@mastra/core/agent';
|
|
33
|
+
import { openai } from '@ai-sdk/openai';
|
|
34
34
|
|
|
35
35
|
const agent = new Agent({
|
|
36
36
|
name: 'my-agent',
|
|
@@ -40,108 +40,99 @@ const agent = new Agent({
|
|
|
40
40
|
});
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
[
|
|
43
|
+
[Agent documentation →](https://mastra.ai/docs/agents/00-overview)
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### Workflows (`/workflows`)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Workflows orchestrate complex AI tasks by combining multiple actions into a coherent sequence. They handle state management, error recovery, and can include conditional logic and parallel execution.
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
|
-
import {
|
|
51
|
-
import { embed } from 'ai';
|
|
50
|
+
import { Workflow } from '@mastra/core';
|
|
52
51
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const workflow = new Workflow({
|
|
53
|
+
name: 'my-workflow',
|
|
54
|
+
steps: [
|
|
55
|
+
// Workflow steps
|
|
56
|
+
],
|
|
56
57
|
});
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
[More embeddings documentation →](https://mastra.ai/docs/reference/embeddings/overview)
|
|
62
|
-
|
|
63
|
-
### Evaluations (`/eval`)
|
|
64
|
-
|
|
65
|
-
The evaluation system enables quantitative assessment of AI outputs. Create custom metrics to measure specific aspects of AI performance, from response quality to task completion accuracy.
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
import { Metric, evaluate } from '@mastra/core';
|
|
69
|
-
|
|
70
|
-
class CustomMetric extends Metric {
|
|
71
|
-
async measure(input: string, output: string): Promise<MetricResult> {
|
|
72
|
-
// Your evaluation logic
|
|
73
|
-
return { score: 0.95 };
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
[More evaluations documentation →](https://mastra.ai/docs/reference/eval/overview)
|
|
60
|
+
[Workflow documentation →](https://mastra.ai/docs/workflows/00-overview)
|
|
79
61
|
|
|
80
62
|
### Memory (`/memory`)
|
|
81
63
|
|
|
82
64
|
Memory management provides persistent storage and retrieval of AI interactions. It supports different storage backends and enables context-aware conversations and long-term learning.
|
|
83
65
|
|
|
84
66
|
```typescript
|
|
85
|
-
import {
|
|
67
|
+
import { Memory } from '@mastra/memory';
|
|
68
|
+
import { Agent } from '@mastra/core/agent';
|
|
69
|
+
import { openai } from '@ai-sdk/openai';
|
|
86
70
|
|
|
87
|
-
const
|
|
88
|
-
|
|
71
|
+
const agent = new Agent({
|
|
72
|
+
name: 'Project Manager',
|
|
73
|
+
instructions: 'You are a project manager assistant.',
|
|
74
|
+
model: openai('gpt-4o-mini'),
|
|
75
|
+
memory: new Memory({
|
|
76
|
+
options: {
|
|
77
|
+
lastMessages: 20,
|
|
78
|
+
semanticRecall: {
|
|
79
|
+
topK: 3,
|
|
80
|
+
messageRange: { before: 2, after: 1 },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
89
84
|
});
|
|
90
85
|
```
|
|
91
86
|
|
|
92
|
-
|
|
93
|
-
To use a premade memory strategy (recommended), with long and short term memory built in, use `import { Memory } from "@mastra/memory"` instead.
|
|
94
|
-
|
|
95
|
-
[Visit the memory documentation to use Memory in your project →](https://mastra.ai/docs/reference/memory/overview)
|
|
96
|
-
|
|
97
|
-
### Vector Stores (`/vector`)
|
|
98
|
-
|
|
99
|
-
Vector stores provide the infrastructure for storing and querying vector embeddings. They support semantic search, similarity matching, and efficient vector operations across different backend implementations.
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
import { MastraVector } from '@mastra/core';
|
|
103
|
-
|
|
104
|
-
class CustomVectorStore extends MastraVector {
|
|
105
|
-
// Vector store implementation
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
[More vector stores documentation →](https://mastra.ai/docs/reference/vector/overview)
|
|
87
|
+
[Memory documentation →](https://mastra.ai/docs/reference/memory/Memory)
|
|
110
88
|
|
|
111
|
-
###
|
|
89
|
+
### Tools (`/tools`)
|
|
112
90
|
|
|
113
|
-
|
|
91
|
+
Tools are functions that agents can use to interact with external systems or perform specific tasks. Each tool has a clear description and schema, making it easy for AI to understand and use them effectively.
|
|
114
92
|
|
|
115
93
|
```typescript
|
|
116
|
-
import {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
94
|
+
import { createTool } from '@mastra/core/tools';
|
|
95
|
+
import { z } from 'zod';
|
|
96
|
+
|
|
97
|
+
const weatherInfo = createTool({
|
|
98
|
+
id: 'Get Weather Information',
|
|
99
|
+
inputSchema: z.object({
|
|
100
|
+
city: z.string(),
|
|
101
|
+
}),
|
|
102
|
+
description: 'Fetches the current weather information for a given city',
|
|
103
|
+
execute: async ({ context: { city } }) => {
|
|
104
|
+
// Tool implementation
|
|
105
|
+
},
|
|
123
106
|
});
|
|
124
107
|
```
|
|
125
108
|
|
|
126
|
-
[
|
|
109
|
+
[Tools documentation →](https://mastra.ai/docs/agents/02-adding-tools)
|
|
127
110
|
|
|
128
|
-
###
|
|
111
|
+
### Evals (`/eval`)
|
|
129
112
|
|
|
130
|
-
|
|
113
|
+
The evaluation system enables quantitative assessment of AI outputs. Create custom metrics to measure specific aspects of AI performance, from response quality to task completion accuracy.
|
|
131
114
|
|
|
132
115
|
```typescript
|
|
133
|
-
import {
|
|
116
|
+
import { Agent } from '@mastra/core/agent';
|
|
117
|
+
import { openai } from '@ai-sdk/openai';
|
|
118
|
+
import { SummarizationMetric } from '@mastra/evals/llm';
|
|
119
|
+
import { ContentSimilarityMetric, ToneConsistencyMetric } from '@mastra/evals/nlp';
|
|
134
120
|
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
121
|
+
const model = openai('gpt-4o');
|
|
122
|
+
|
|
123
|
+
const agent = new Agent({
|
|
124
|
+
name: 'ContentWriter',
|
|
125
|
+
instructions: 'You are a content writer that creates accurate summaries',
|
|
126
|
+
model,
|
|
127
|
+
evals: {
|
|
128
|
+
summarization: new SummarizationMetric(model),
|
|
129
|
+
contentSimilarity: new ContentSimilarityMetric(),
|
|
130
|
+
tone: new ToneConsistencyMetric(),
|
|
140
131
|
},
|
|
141
132
|
});
|
|
142
133
|
```
|
|
143
134
|
|
|
144
|
-
[More
|
|
135
|
+
[More evals documentation →](https://mastra.ai/docs/evals/00-overview)
|
|
145
136
|
|
|
146
137
|
### Logger (`/logger`)
|
|
147
138
|
|
|
@@ -160,13 +151,24 @@ const logger = createLogger({
|
|
|
160
151
|
|
|
161
152
|
### Telemetry (`/telemetry`)
|
|
162
153
|
|
|
163
|
-
Telemetry provides OpenTelemetry integration for comprehensive monitoring of your AI systems. Track latency, success rates, and system health with distributed tracing and metrics collection.
|
|
154
|
+
Telemetry provides OpenTelemetry (Otel) integration for comprehensive monitoring of your AI systems. Track latency, success rates, and system health with distributed tracing and metrics collection.
|
|
164
155
|
|
|
165
156
|
```typescript
|
|
166
|
-
import {
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
157
|
+
import { Mastra } from '@mastra/core';
|
|
158
|
+
|
|
159
|
+
const mastra = new Mastra({
|
|
160
|
+
telemetry: {
|
|
161
|
+
serviceName: 'my-service',
|
|
162
|
+
enabled: true,
|
|
163
|
+
sampling: {
|
|
164
|
+
type: 'ratio',
|
|
165
|
+
probability: 0.5,
|
|
166
|
+
},
|
|
167
|
+
export: {
|
|
168
|
+
type: 'otlp',
|
|
169
|
+
endpoint: 'https://otel-collector.example.com/v1/traces',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
170
172
|
});
|
|
171
173
|
```
|
|
172
174
|
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3HE5CJBG_cjs = require('../chunk-3HE5CJBG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Agent", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk3HE5CJBG_cjs.Agent; }
|
|
10
10
|
});
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
5
|
-
import '../base-
|
|
6
|
-
import '../types-
|
|
4
|
+
export { j as Agent, k as AgentConfig, aL as AgentGenerateOptions, aM as AgentStreamOptions, aF as MastraLanguageModel, aG as ToolsInput, aK as ToolsetsInput } from '../base-Dpt4tO56.cjs';
|
|
5
|
+
import '../base-CvQbEqGB.cjs';
|
|
6
|
+
import '../types-BtMyV38I.cjs';
|
|
7
7
|
import 'sift';
|
|
8
8
|
import '../index-CquI0inB.cjs';
|
|
9
9
|
import 'stream';
|
|
@@ -17,3 +17,5 @@ import '@opentelemetry/sdk-trace-base';
|
|
|
17
17
|
import '../tts/index.cjs';
|
|
18
18
|
import '../deployer/index.cjs';
|
|
19
19
|
import '../bundler/index.cjs';
|
|
20
|
+
import 'hono';
|
|
21
|
+
import 'hono-openapi';
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { Message as AiMessageType } from 'ai';
|
|
2
2
|
import 'json-schema';
|
|
3
3
|
import 'zod';
|
|
4
|
-
export {
|
|
5
|
-
import '../base-
|
|
6
|
-
import '../types-
|
|
4
|
+
export { j as Agent, k as AgentConfig, aL as AgentGenerateOptions, aM as AgentStreamOptions, aF as MastraLanguageModel, aG as ToolsInput, aK as ToolsetsInput } from '../base-CQuRWXAH.js';
|
|
5
|
+
import '../base-BA_in99t.js';
|
|
6
|
+
import '../types-BtMyV38I.js';
|
|
7
7
|
import 'sift';
|
|
8
8
|
import '../index-CquI0inB.js';
|
|
9
9
|
import 'stream';
|
|
@@ -17,3 +17,5 @@ import '@opentelemetry/sdk-trace-base';
|
|
|
17
17
|
import '../tts/index.js';
|
|
18
18
|
import '../deployer/index.js';
|
|
19
19
|
import '../bundler/index.js';
|
|
20
|
+
import 'hono';
|
|
21
|
+
import 'hono-openapi';
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Agent } from '../chunk-
|
|
1
|
+
export { Agent } from '../chunk-HCDXBSMK.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
|
-
import { Tracer, Span } from '@opentelemetry/api';
|
|
2
|
+
import { Tracer, Span, Context } from '@opentelemetry/api';
|
|
3
3
|
import { R as RegisteredLogger, L as Logger } from './index-CquI0inB.js';
|
|
4
4
|
import { SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
5
5
|
|
|
@@ -71,6 +71,7 @@ declare class Telemetry {
|
|
|
71
71
|
* @returns Telemetry instance that can be used for tracing
|
|
72
72
|
*/
|
|
73
73
|
static init(config?: OtelConfig): Telemetry;
|
|
74
|
+
static getActiveSpan(): Span | undefined;
|
|
74
75
|
/**
|
|
75
76
|
* Get the global telemetry instance
|
|
76
77
|
* @throws {Error} If telemetry has not been initialized
|
|
@@ -93,6 +94,8 @@ declare class Telemetry {
|
|
|
93
94
|
/** Skip tracing if telemetry is not active */
|
|
94
95
|
skipIfNoTelemetry?: boolean;
|
|
95
96
|
}): T;
|
|
97
|
+
static setBaggage(baggage: Record<string, string>, ctx?: Context): Context;
|
|
98
|
+
static withContext(ctx: Context, fn: () => void): void;
|
|
96
99
|
/**
|
|
97
100
|
* method to trace individual methods with proper context
|
|
98
101
|
* @param method The method to trace
|