@logbrew/next 0.1.6 → 0.1.7
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 +2 -2
- package/client.cjs +2 -5
- package/client.js +2 -5
- package/examples/client-route-spans.mjs +1 -1
- package/examples/readme-example.mjs +1 -1
- package/examples/real-user-smoke.mjs +1 -1
- package/index.cjs +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -232,7 +232,7 @@ import {
|
|
|
232
232
|
const client = createLogBrewNextBrowserClient({
|
|
233
233
|
clientKey: "LOGBREW_CLIENT_KEY",
|
|
234
234
|
sdkName: "my-next-app",
|
|
235
|
-
sdkVersion: "0.1.
|
|
235
|
+
sdkVersion: "0.1.7"
|
|
236
236
|
});
|
|
237
237
|
|
|
238
238
|
const routePatterns = [
|
|
@@ -269,7 +269,7 @@ import { createLogBrewNextClient } from "@logbrew/next";
|
|
|
269
269
|
const client = createLogBrewNextClient({
|
|
270
270
|
serverApiKey: "LOGBREW_SERVER_API_KEY",
|
|
271
271
|
sdkName: "my-next-app",
|
|
272
|
-
sdkVersion: "0.1.
|
|
272
|
+
sdkVersion: "0.1.7"
|
|
273
273
|
});
|
|
274
274
|
```
|
|
275
275
|
|
package/client.cjs
CHANGED
|
@@ -7,16 +7,13 @@ const {
|
|
|
7
7
|
parseTraceparent
|
|
8
8
|
} = require("@logbrew/sdk");
|
|
9
9
|
|
|
10
|
-
const DEFAULT_SDK_NAME = "logbrew-next-client";
|
|
11
|
-
const DEFAULT_SDK_VERSION = "0.1.6";
|
|
12
|
-
|
|
13
10
|
function createLogBrewNextBrowserClient({
|
|
14
11
|
apiKey,
|
|
15
12
|
clientKey,
|
|
16
13
|
context,
|
|
17
14
|
eventFilter,
|
|
18
|
-
sdkName =
|
|
19
|
-
sdkVersion =
|
|
15
|
+
sdkName = "logbrew-next-client",
|
|
16
|
+
sdkVersion = "0.1.7",
|
|
20
17
|
maxQueueSize,
|
|
21
18
|
maxRetries = 2,
|
|
22
19
|
onEventDropped
|
package/client.js
CHANGED
|
@@ -7,16 +7,13 @@ import {
|
|
|
7
7
|
parseTraceparent
|
|
8
8
|
} from "@logbrew/sdk";
|
|
9
9
|
|
|
10
|
-
const DEFAULT_SDK_NAME = "logbrew-next-client";
|
|
11
|
-
const DEFAULT_SDK_VERSION = "0.1.6";
|
|
12
|
-
|
|
13
10
|
export function createLogBrewNextBrowserClient({
|
|
14
11
|
apiKey,
|
|
15
12
|
clientKey,
|
|
16
13
|
context,
|
|
17
14
|
eventFilter,
|
|
18
|
-
sdkName =
|
|
19
|
-
sdkVersion =
|
|
15
|
+
sdkName = "logbrew-next-client",
|
|
16
|
+
sdkVersion = "0.1.7",
|
|
20
17
|
maxQueueSize,
|
|
21
18
|
maxRetries = 2,
|
|
22
19
|
onEventDropped
|
|
@@ -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.
|
|
27
|
+
if (!event || event.attributes.metadata.routeTemplate !== "/projects/[projectId]/settings" || event.attributes.metadata.operation !== "browser.navigation" || payload.sdk.version !== "0.1.7") {
|
|
28
28
|
throw new Error(`unexpected Next client route span: ${JSON.stringify(event)}`);
|
|
29
29
|
}
|
|
30
30
|
|
package/index.cjs
CHANGED
|
@@ -6,8 +6,6 @@ const {
|
|
|
6
6
|
} = require("@logbrew/sdk");
|
|
7
7
|
const { createNodeFetchTransport } = require("@logbrew/node");
|
|
8
8
|
|
|
9
|
-
const DEFAULT_SDK_NAME = "logbrew-next";
|
|
10
|
-
const DEFAULT_SDK_VERSION = "0.1.6";
|
|
11
9
|
const MAX_REQUEST_ERROR_MESSAGE_LENGTH = 2048;
|
|
12
10
|
const MAX_REQUEST_ROUTE_PATH_LENGTH = 512;
|
|
13
11
|
const NEXT_RENDER_SOURCES = new Set([
|
|
@@ -25,8 +23,8 @@ function createLogBrewNextClient({
|
|
|
25
23
|
apiKey,
|
|
26
24
|
serverApiKey,
|
|
27
25
|
context,
|
|
28
|
-
sdkName =
|
|
29
|
-
sdkVersion =
|
|
26
|
+
sdkName = "logbrew-next",
|
|
27
|
+
sdkVersion = "0.1.7",
|
|
30
28
|
maxRetries = 2
|
|
31
29
|
} = {}) {
|
|
32
30
|
const authKey = serverApiKey ?? apiKey ?? readEnvServerApiKey() ?? readEnvApiKey();
|