@brizz/sdk 0.1.45 → 0.1.47
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 +13 -7
- package/dist/{chunk-CBEDIRVK.cjs → chunk-EWT4TUB7.cjs} +6 -6
- package/dist/{chunk-BAQTZKGI.js → chunk-V727EJE5.js} +7 -7
- package/dist/index.cjs +371 -59
- package/dist/index.js +350 -38
- package/dist/{mcp-CCFYA5CI.cjs → mcp-3FOEDOF2.cjs} +11 -11
- package/dist/{mcp-FTYCIWL4.js → mcp-GANFYW4J.js} +1 -1
- package/dist/types/cjs/internal/instrumentation/langgraph/attributes.d.ts +38 -0
- package/dist/types/cjs/internal/instrumentation/langgraph/index.d.ts +1 -0
- package/dist/types/cjs/internal/instrumentation/langgraph/instrumentation.d.ts +11 -0
- package/dist/types/cjs/internal/instrumentation/registry.d.ts +1 -0
- package/dist/types/esm/internal/instrumentation/langgraph/attributes.d.ts +38 -0
- package/dist/types/esm/internal/instrumentation/langgraph/index.d.ts +1 -0
- package/dist/types/esm/internal/instrumentation/langgraph/instrumentation.d.ts +11 -0
- package/dist/types/esm/internal/instrumentation/registry.d.ts +1 -0
- package/package.json +29 -22
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
6
|
|
|
7
|
-
OpenTelemetry-based observability SDK for AI applications
|
|
8
|
-
OpenAI, Anthropic, Vercel AI SDK, and more.
|
|
7
|
+
OpenTelemetry-based observability SDK for AI applications, built by [Brizz](https://www.brizz.ai).
|
|
8
|
+
Traces popular AI libraries including OpenAI, Anthropic, Vercel AI SDK, and more.
|
|
9
9
|
|
|
10
10
|
## Table of Contents
|
|
11
11
|
|
|
@@ -29,6 +29,7 @@ OpenAI, Anthropic, Vercel AI SDK, and more.
|
|
|
29
29
|
- [Examples](#examples)
|
|
30
30
|
- [Troubleshooting](#troubleshooting)
|
|
31
31
|
- [Contributing](#contributing)
|
|
32
|
+
- [Links](#links)
|
|
32
33
|
- [License](#license)
|
|
33
34
|
|
|
34
35
|
## Features
|
|
@@ -105,7 +106,7 @@ Pass the libraries you use to `instrumentModules` and the SDK traces them:
|
|
|
105
106
|
- **OpenAI** - `openai` package
|
|
106
107
|
- **Anthropic** - `@anthropic-ai/sdk` package
|
|
107
108
|
- **Vercel AI SDK** - `ai` package (generateText, streamText, etc.)
|
|
108
|
-
- Captured through `experimental_telemetry: { isEnabled: true }` on each call
|
|
109
|
+
- Captured through the AI SDK's own telemetry, not `instrumentModules` — on by default on `ai@7` (with `@ai-sdk/otel` installed); on `ai@6` and earlier, pass `experimental_telemetry: { isEnabled: true }` on each call
|
|
109
110
|
- **LangChain** - `langchain` and `@langchain/*` packages
|
|
110
111
|
- **LlamaIndex** - `llamaindex` package
|
|
111
112
|
- **AWS Bedrock** - `@aws-sdk/client-bedrock-runtime`
|
|
@@ -134,7 +135,7 @@ On `ai@7` and newer, also install `@ai-sdk/otel` — v7 moved AI SDK span collec
|
|
|
134
135
|
into that package, so without it your `generateText` / `streamText` calls produce no
|
|
135
136
|
spans. It isn't needed on `ai@6`.
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
On `ai@6` and earlier, telemetry is off by default, so enable it on each call. On `ai@7` it is on by default and the flag is optional:
|
|
138
139
|
|
|
139
140
|
```typescript
|
|
140
141
|
import { generateText, streamText } from 'ai';
|
|
@@ -144,14 +145,14 @@ import { openai } from '@ai-sdk/openai';
|
|
|
144
145
|
const result = await generateText({
|
|
145
146
|
model: openai('gpt-4'),
|
|
146
147
|
prompt: 'Hello, world!',
|
|
147
|
-
experimental_telemetry: { isEnabled: true }, // Required
|
|
148
|
+
experimental_telemetry: { isEnabled: true }, // Required on ai@6 and earlier
|
|
148
149
|
});
|
|
149
150
|
|
|
150
151
|
// For streamText
|
|
151
152
|
const stream = streamText({
|
|
152
153
|
model: openai('gpt-4'),
|
|
153
154
|
messages: [{ role: 'user', content: 'Hello!' }],
|
|
154
|
-
experimental_telemetry: { isEnabled: true }, // Required
|
|
155
|
+
experimental_telemetry: { isEnabled: true }, // Required on ai@6 and earlier
|
|
155
156
|
});
|
|
156
157
|
```
|
|
157
158
|
|
|
@@ -869,7 +870,7 @@ Check out the [examples](./examples/) directory for complete working examples:
|
|
|
869
870
|
- Ensure `Brizz.initialize()` runs before any AI calls
|
|
870
871
|
- Pass the libraries you want to trace via `instrumentModules`
|
|
871
872
|
- Check that `BRIZZ_API_KEY` is set
|
|
872
|
-
- For Vercel AI SDK:
|
|
873
|
+
- For Vercel AI SDK: on `ai@7`, install `@ai-sdk/otel`; on `ai@6` and earlier, add `experimental_telemetry: { isEnabled: true }` to function calls
|
|
873
874
|
|
|
874
875
|
**CJS/ESM compatibility issues**
|
|
875
876
|
|
|
@@ -888,6 +889,11 @@ BRIZZ_LOG_LEVEL=debug node your-app.js
|
|
|
888
889
|
|
|
889
890
|
See our [Contributing Guide](../../CONTRIBUTING.md) for development setup and guidelines.
|
|
890
891
|
|
|
892
|
+
## Links
|
|
893
|
+
|
|
894
|
+
- [Website](https://www.brizz.ai)
|
|
895
|
+
- [Documentation](https://docs.brizz.ai)
|
|
896
|
+
|
|
891
897
|
## License
|
|
892
898
|
|
|
893
899
|
Apache-2.0 - see [LICENSE](LICENSE) file.
|
|
@@ -7,6 +7,11 @@ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
|
7
7
|
|
|
8
8
|
var _chunk5WBPX342cjs = require('./chunk-5WBPX342.cjs');
|
|
9
9
|
|
|
10
|
+
// src/internal/version.ts
|
|
11
|
+
function getSDKVersion() {
|
|
12
|
+
return "0.1.47";
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
// src/internal/instrumentation/mcp/session.ts
|
|
11
16
|
var _api = require('@opentelemetry/api');
|
|
12
17
|
var INTENT_PROPERTY = "internal.intent";
|
|
@@ -221,11 +226,6 @@ function popTrackingArguments(request) {
|
|
|
221
226
|
return tracking;
|
|
222
227
|
}
|
|
223
228
|
|
|
224
|
-
// src/internal/version.ts
|
|
225
|
-
function getSDKVersion() {
|
|
226
|
-
return "0.1.45";
|
|
227
|
-
}
|
|
228
|
-
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
|
|
@@ -237,4 +237,4 @@ function getSDKVersion() {
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
exports.resolveTransportSessionId = resolveTransportSessionId; exports.resolveSessionId = resolveSessionId; exports.stampAndPropagateSession = stampAndPropagateSession; exports.configure = configure; exports.isEnabled = isEnabled; exports.isSessionToolCall = isSessionToolCall; exports.sessionToolResult = sessionToolResult; exports.patchListToolsResult = patchListToolsResult; exports.popTrackingArguments = popTrackingArguments;
|
|
240
|
+
exports.getSDKVersion = getSDKVersion; exports.resolveTransportSessionId = resolveTransportSessionId; exports.resolveSessionId = resolveSessionId; exports.stampAndPropagateSession = stampAndPropagateSession; exports.configure = configure; exports.isEnabled = isEnabled; exports.isSessionToolCall = isSessionToolCall; exports.sessionToolResult = sessionToolResult; exports.patchListToolsResult = patchListToolsResult; exports.popTrackingArguments = popTrackingArguments;
|
|
@@ -7,6 +7,11 @@ import {
|
|
|
7
7
|
SESSION_ID
|
|
8
8
|
} from "./chunk-AOT5NJDV.js";
|
|
9
9
|
|
|
10
|
+
// src/internal/version.ts
|
|
11
|
+
function getSDKVersion() {
|
|
12
|
+
return "0.1.47";
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
// src/internal/instrumentation/mcp/session.ts
|
|
11
16
|
import { context } from "@opentelemetry/api";
|
|
12
17
|
var INTENT_PROPERTY = "internal.intent";
|
|
@@ -221,12 +226,8 @@ function popTrackingArguments(request) {
|
|
|
221
226
|
return tracking;
|
|
222
227
|
}
|
|
223
228
|
|
|
224
|
-
// src/internal/version.ts
|
|
225
|
-
function getSDKVersion() {
|
|
226
|
-
return "0.1.45";
|
|
227
|
-
}
|
|
228
|
-
|
|
229
229
|
export {
|
|
230
|
+
getSDKVersion,
|
|
230
231
|
resolveTransportSessionId,
|
|
231
232
|
resolveSessionId,
|
|
232
233
|
stampAndPropagateSession,
|
|
@@ -235,6 +236,5 @@ export {
|
|
|
235
236
|
isSessionToolCall,
|
|
236
237
|
sessionToolResult,
|
|
237
238
|
patchListToolsResult,
|
|
238
|
-
popTrackingArguments
|
|
239
|
-
getSDKVersion
|
|
239
|
+
popTrackingArguments
|
|
240
240
|
};
|