@mastra/langsmith 1.3.15-alpha.0 → 1.3.15-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 +13 -54
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mastra/langsmith
2
2
 
3
- LangSmith AI Observability exporter for Mastra applications.
3
+ Export Mastra traces to LangSmith for LLM monitoring and evaluation with project, API key, endpoint, and environment configuration.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,74 +10,33 @@ npm install @mastra/langsmith
10
10
 
11
11
  ## Usage
12
12
 
13
- ### Zero-Config Setup
14
-
15
- The exporter automatically reads credentials from environment variables:
16
-
17
- ```bash
18
- # Required
19
- LANGSMITH_API_KEY=lsv2_pt_...
20
-
21
- # Optional
22
- LANGCHAIN_PROJECT=my-project # Project name, defaults to "default"
23
- ```
13
+ Set `LANGSMITH_API_KEY` before creating the exporter.
24
14
 
25
15
  ```typescript
16
+ import { Mastra } from '@mastra/core/mastra';
17
+ import { Observability } from '@mastra/observability';
26
18
  import { LangSmithExporter } from '@mastra/langsmith';
27
19
 
28
- const mastra = new Mastra({
29
- ...,
30
- observability: {
20
+ export const mastra = new Mastra({
21
+ observability: new Observability({
31
22
  configs: {
32
23
  langsmith: {
33
24
  serviceName: 'my-service',
34
25
  exporters: [new LangSmithExporter()],
35
26
  },
36
27
  },
37
- },
28
+ }),
38
29
  });
39
30
  ```
40
31
 
41
- ### Explicit Configuration
42
-
43
- You can also pass credentials directly:
44
-
45
- ```typescript
46
- import { LangSmithExporter } from '@mastra/langsmith';
47
-
48
- const mastra = new Mastra({
49
- ...,
50
- observability: {
51
- configs: {
52
- langsmith: {
53
- serviceName: 'my-service',
54
- exporters: [
55
- new LangSmithExporter({
56
- apiKey: 'lsv2_pt_...',
57
- projectName: 'my-custom-project', // Optional
58
- }),
59
- ],
60
- },
61
- },
62
- },
63
- });
64
- ```
32
+ ## Documentation
65
33
 
66
- ### Configuration Options
34
+ - [LangSmith](https://mastra.ai/integrations/observability/langsmith)
67
35
 
68
- | Option | Type | Description |
69
- | ------------- | -------- | ------------------------------------------------------------------------------------------ |
70
- | `apiKey` | `string` | LangSmith API key. Defaults to `LANGSMITH_API_KEY` env var |
71
- | `projectName` | `string` | The name of the LangSmith project to send traces to. Overrides `LANGCHAIN_PROJECT` env var |
72
- | `apiUrl` | `string` | Custom LangSmith API URL (for self-hosted instances) |
73
- | `client` | `Client` | Custom LangSmith client instance |
36
+ ## Changelog
74
37
 
75
- ## Features
38
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/observability/langsmith/CHANGELOG.md) for version history and release notes.
76
39
 
77
- ### Tracing
40
+ ## Support
78
41
 
79
- - **Automatic span mapping**: Root spans become LangSmith traces
80
- - **Type-specific metadata**: Extracts relevant metadata for each span type (agents, tools, workflows)
81
- - **Error tracking**: Automatic error status and message tracking
82
- - **Hierarchical traces**: Maintains parent-child relationships
83
- - **Event span support**: Zero-duration spans for event-type traces
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/langsmith",
3
- "version": "1.3.15-alpha.0",
3
+ "version": "1.3.15-alpha.2",
4
4
  "description": "Langsmith observability provider for Mastra - includes tracing and future observability features",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
26
  "langsmith": "^0.8.7",
27
- "@mastra/observability": "1.17.5-alpha.0"
27
+ "@mastra/observability": "1.17.5-alpha.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@ai-sdk/openai": "^2.0.115",
@@ -39,8 +39,8 @@
39
39
  "zod": "^4.4.3",
40
40
  "@internal/types-builder": "0.0.104",
41
41
  "@internal/lint": "0.0.129",
42
- "@mastra/core": "1.64.0-alpha.2",
43
- "@observability/test-utils": "0.1.0"
42
+ "@observability/test-utils": "0.1.0",
43
+ "@mastra/core": "1.64.0-alpha.8"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@mastra/core": ">=1.16.0-0 <2.0.0-0"