@logbrew/next 0.1.11 → 0.1.12

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 CHANGED
@@ -75,6 +75,24 @@ rm -f "$HOME/.logbrew/next-service.ingest"
75
75
  unset LOGBREW_PROJECT_ID
76
76
  ```
77
77
 
78
+ ## Read Events Back
79
+
80
+ A successful send shows that LogBrew accepted the request. It does not show
81
+ that you can read the event. After your app sends one event, read it
82
+ back with a project read key:
83
+
84
+ ```bash
85
+ logbrew projects keys create "<project_id>" --kind read \
86
+ --ingest-key-file "$HOME/.logbrew/setup-check.read" --json
87
+ export LOGBREW_TOKEN="$(< "$HOME/.logbrew/setup-check.read")"
88
+ logbrew read logs --since 1h --json
89
+ logbrew issues --since 1h --json
90
+ ```
91
+
92
+ A read key reads 1 project and cannot send telemetry. Run `unset LOGBREW_TOKEN`
93
+ when you finish. [Read your events back](https://docs.logbrew.co/guides/verify-setup)
94
+ covers key kinds, empty results, and how to revoke the key.
95
+
78
96
  ## Release Artifacts
79
97
 
80
98
  For production Next.js builds, wrap `next.config.mjs` with the build-time release-artifact helper. It enables `productionBrowserSourceMaps` only when your config has not chosen a value, runs after the production compile, injects matching Debug IDs, strips embedded source text by default, writes a privacy-bounded manifest next to `.next`, and can upload the prepared artifacts before the build completes:
@@ -245,7 +263,7 @@ import {
245
263
  const client = createLogBrewNextBrowserClient({
246
264
  clientKey: "LOGBREW_CLIENT_KEY",
247
265
  sdkName: "my-next-app",
248
- sdkVersion: "0.1.11"
266
+ sdkVersion: "0.1.12"
249
267
  });
250
268
 
251
269
  const routePatterns = [
@@ -322,7 +340,7 @@ import { createLogBrewNextClient } from "@logbrew/next";
322
340
  const client = createLogBrewNextClient({
323
341
  serverApiKey: "LOGBREW_SERVER_API_KEY",
324
342
  sdkName: "my-next-app",
325
- sdkVersion: "0.1.11"
343
+ sdkVersion: "0.1.12"
326
344
  });
327
345
  ```
328
346
 
package/client.cjs CHANGED
@@ -22,7 +22,7 @@ function createLogBrewNextBrowserClient({
22
22
  endpoint = DEFAULT_ENDPOINT,
23
23
  eventFilter,
24
24
  sdkName = "logbrew-next-client",
25
- sdkVersion = "0.1.11",
25
+ sdkVersion = "0.1.12",
26
26
  maxQueueSize,
27
27
  maxRetries = 2,
28
28
  onEventDropped,
package/client.js CHANGED
@@ -22,7 +22,7 @@ export function createLogBrewNextBrowserClient({
22
22
  endpoint = DEFAULT_ENDPOINT,
23
23
  eventFilter,
24
24
  sdkName = "logbrew-next-client",
25
- sdkVersion = "0.1.11",
25
+ sdkVersion = "0.1.12",
26
26
  maxQueueSize,
27
27
  maxRetries = 2,
28
28
  onEventDropped,
package/edge.cjs CHANGED
@@ -25,7 +25,7 @@ function createLogBrewNextEdgeRequestErrorHandler(options = {}) {
25
25
  apiKey: authKey,
26
26
  context: deploymentContext,
27
27
  sdkName: options.sdkName ?? "logbrew-next",
28
- sdkVersion: options.sdkVersion ?? "0.1.11",
28
+ sdkVersion: options.sdkVersion ?? "0.1.12",
29
29
  maxRetries: options.maxRetries ?? 2
30
30
  });
31
31
  const event = typeof options.errorEvent === "function"
@@ -24,7 +24,7 @@ const event = captureNextNavigation(client, {
24
24
  });
25
25
 
26
26
  const payload = JSON.parse(client.previewJson());
27
- if (!event || event.attributes.metadata.routeTemplate !== "/projects/[projectId]/settings" || event.attributes.metadata.operation !== "browser.navigation" || payload.sdk.version !== "0.1.11") {
27
+ if (!event || event.attributes.metadata.routeTemplate !== "/projects/[projectId]/settings" || event.attributes.metadata.operation !== "browser.navigation" || payload.sdk.version !== "0.1.12") {
28
28
  throw new Error(`unexpected Next client route span: ${JSON.stringify(event)}`);
29
29
  }
30
30
 
@@ -12,7 +12,7 @@ const POST = withLogBrewRouteHandler(
12
12
  serverApiKey: "LOGBREW_SERVER_API_KEY",
13
13
  captureRequests: false,
14
14
  sdkName: "logbrew-next-readme-example",
15
- sdkVersion: "0.1.11",
15
+ sdkVersion: "0.1.12",
16
16
  transport
17
17
  }
18
18
  );
@@ -12,7 +12,7 @@ const POST = withLogBrewRouteHandler(
12
12
  serverApiKey: "LOGBREW_SERVER_API_KEY",
13
13
  captureRequests: false,
14
14
  sdkName: "logbrew-next-real-user-smoke",
15
- sdkVersion: "0.1.11",
15
+ sdkVersion: "0.1.12",
16
16
  maxRetries: 1,
17
17
  transport
18
18
  }
package/index.cjs CHANGED
@@ -23,7 +23,7 @@ function createLogBrewNextClient({
23
23
  serverApiKey,
24
24
  context,
25
25
  sdkName = "logbrew-next",
26
- sdkVersion = "0.1.11",
26
+ sdkVersion = "0.1.12",
27
27
  maxRetries = 2
28
28
  } = {}) {
29
29
  const authKey = serverApiKey ?? apiKey ?? readEnvServerApiKey() ?? readEnvApiKey();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logbrew/next",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Next.js App Router helpers for the public LogBrew JavaScript SDK.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",