@rely-net/sdk 1.0.2 → 1.0.3

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 +17 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,6 +5,7 @@ Official SDK for [rely.net](https://rely.net) — monitor your application from
5
5
  ## What it does
6
6
 
7
7
  - Sends health check results from inside your app to rely.net
8
+ - Attributes outgoing HTTP calls to vendors (Stripe, OpenAI, etc.) with per-vendor p95 + error rates
8
9
  - Tracks custom metrics alongside vendor status
9
10
  - Marks deployments on your monitoring charts
10
11
  - Captures request telemetry (error rate, response times)
@@ -145,6 +146,21 @@ export const config = {
145
146
  }
146
147
  ```
147
148
 
149
+ ## Outgoing vendor calls
150
+
151
+ The SDK wraps the global `fetch` on init to bucket outgoing HTTP calls by hostname and report p50/p95/p99 + error rates per vendor. rely.net matches hostnames to known vendors (Stripe, OpenAI, Supabase, etc.) so you see vendor latency from your app's perspective — the answer to "is it me or is it Stripe?" without writing any code.
152
+
153
+ Enabled by default. Disable with:
154
+
155
+ ```ts
156
+ new Rely({
157
+ apiKey: process.env.RELY_API_KEY!,
158
+ instrumentFetch: false,
159
+ })
160
+ ```
161
+
162
+ Self-calls to the rely.net ingest endpoint are always skipped.
163
+
148
164
  ## Deployment markers
149
165
 
150
166
  Deployment markers are sent automatically when the SDK initializes. They appear as vertical lines on your charts in rely.net, making it easy to correlate issues with deploys.
@@ -167,6 +183,7 @@ new Rely({
167
183
  environment?: string, // default: process.env.NODE_ENV
168
184
  flushInterval?: number, // default: 60000 (ms)
169
185
  sanitizeErrors?: boolean, // default: true (recommended)
186
+ instrumentFetch?: boolean,// default: true (wraps global fetch)
170
187
  debug?: boolean, // default: false
171
188
  })
172
189
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-net/sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Official SDK for rely.net — monitor your app from the inside",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",