@mastra/arthur 0.4.13-alpha.0 → 0.4.13-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.
Files changed (2) hide show
  1. package/README.md +14 -83
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @mastra/arthur - OpenTelemetry + OpenInference Tracing Exporter
1
+ # @mastra/arthur
2
2
 
3
3
  Export Mastra traces to [Arthur AI](https://arthur.ai) using [OpenInference Semantic Conventions](https://github.com/Arize-ai/openinference/tree/main/spec).
4
4
 
@@ -8,104 +8,35 @@ Export Mastra traces to [Arthur AI](https://arthur.ai) using [OpenInference Sema
8
8
  npm install @mastra/arthur
9
9
  ```
10
10
 
11
- ## Configuration
11
+ ## Usage
12
12
 
13
- Add `ArthurExporter` to your Mastra configuration to export traces to Arthur. The exporter automatically reads credentials from environment variables, enabling zero-config setup.
14
-
15
- ### Zero-Config
16
-
17
- Set environment variables:
18
-
19
- ```bash
20
- ARTHUR_API_KEY=your-api-key
21
- ARTHUR_BASE_URL=https://app.arthur.ai
22
- ARTHUR_TASK_ID=your-task-id # optional, associates traces with a specific Arthur task
23
- ```
13
+ Set `ARTHUR_API_KEY` and `ARTHUR_BASE_URL` before creating the exporter.
24
14
 
25
15
  ```typescript
26
- import { ArthurExporter } from '@mastra/arthur';
27
16
  import { Mastra } from '@mastra/core/mastra';
28
-
29
- const mastra = new Mastra({
30
- ...,
31
- observability: {
32
- configs: {
33
- arthur: {
34
- serviceName: 'my-service',
35
- exporters: [new ArthurExporter()],
36
- },
37
- },
38
- },
39
- });
40
- ```
41
-
42
- ### Explicit Configuration
43
-
44
- ```typescript
17
+ import { Observability } from '@mastra/observability';
45
18
  import { ArthurExporter } from '@mastra/arthur';
46
- import { Mastra } from '@mastra/core/mastra';
47
19
 
48
- const mastra = new Mastra({
49
- ...,
50
- observability: {
20
+ export const mastra = new Mastra({
21
+ observability: new Observability({
51
22
  configs: {
52
23
  arthur: {
53
24
  serviceName: 'my-service',
54
- exporters: [
55
- new ArthurExporter({
56
- apiKey: 'your-api-key',
57
- endpoint: 'https://app.arthur.ai',
58
- }),
59
- ],
25
+ exporters: [new ArthurExporter()],
60
26
  },
61
27
  },
62
- },
28
+ }),
63
29
  });
64
30
  ```
65
31
 
66
- ## Optional Configuration
32
+ ## Documentation
67
33
 
68
- ```typescript
69
- new ArthurExporter({
70
- // Required at runtime (or set ARTHUR_API_KEY env var)
71
- apiKey: 'your-api-key',
72
- // Required at runtime (or set ARTHUR_BASE_URL env var)
73
- endpoint: 'https://app.arthur.ai',
74
- // Optional headers added to each OTLP request
75
- headers: {
76
- 'x-custom-header': 'value',
77
- },
78
- // Optional log level for debugging
79
- logLevel: 'debug',
80
- // Optional batch size for the underlying BatchSpanProcessor
81
- batchSize: 512,
82
- // Optional timeout for span export
83
- timeout: 30000,
84
- // Optional resource attributes added to each span
85
- resourceAttributes: {
86
- 'custom.attribute': 'value',
87
- },
88
- });
89
- ```
90
-
91
- ### Custom metadata
92
-
93
- Custom span attributes are serialized into the OpenInference `metadata` payload. Add them through `tracingOptions.metadata`:
94
-
95
- ```typescript
96
- await agent.generate(input, {
97
- tracingOptions: {
98
- metadata: {
99
- companyId: 'acme-co',
100
- },
101
- },
102
- });
103
- ```
34
+ - [@mastra/arthur documentation](https://mastra.ai/integrations/observability/arthur)
104
35
 
105
- ## OpenInference Semantic Conventions
36
+ ## Changelog
106
37
 
107
- This exporter follows the [OpenInference Semantic Conventions](https://github.com/Arize-ai/openinference/tree/main/spec) for generative AI applications. All agent runs, tool calls, and LLM generations are automatically tagged with the correct span kinds and attributes.
38
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/observability/arthur/CHANGELOG.md) for version history and release notes.
108
39
 
109
- ## License
40
+ ## Support
110
41
 
111
- Apache 2.0
42
+ We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/arthur",
3
- "version": "0.4.13-alpha.0",
3
+ "version": "0.4.13-alpha.2",
4
4
  "description": "Arthur AI observability provider for Mastra - exports traces using OpenInference semantic conventions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "@opentelemetry/exporter-trace-otlp-proto": "^0.221.0",
30
30
  "@opentelemetry/sdk-trace-base": "^2.10.0",
31
31
  "@opentelemetry/semantic-conventions": "^1.43.0",
32
- "@mastra/otel-exporter": "1.3.13-alpha.0"
32
+ "@mastra/otel-exporter": "1.3.13-alpha.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "22.20.1",
@@ -39,9 +39,9 @@
39
39
  "tsdown": "0.22.9",
40
40
  "typescript": "^7.0.2",
41
41
  "vitest": "4.1.10",
42
- "@internal/lint": "0.0.129",
43
- "@mastra/core": "1.64.0-alpha.2",
44
- "@internal/types-builder": "0.0.104"
42
+ "@internal/types-builder": "0.0.104",
43
+ "@mastra/core": "1.64.0-alpha.8",
44
+ "@internal/lint": "0.0.129"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@mastra/core": ">=1.16.0-0 <2.0.0-0"