playwright-opentelemetry 0.11.0 → 0.11.1
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/dist/{config-Csi-apHL.cjs → config-Dlhv7Jh9.cjs} +8 -6
- package/dist/{config-B0-IOZF-.mjs → config-vP1SpMPF.mjs} +8 -6
- package/dist/fixture.cjs +1 -1
- package/dist/fixture.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{reporter-BGMoVKC7.mjs → reporter-CeXM-i19.mjs} +1 -1
- package/dist/{reporter-DszuIYsI.cjs → reporter-SVZk1e4Y.cjs} +1 -1
- package/dist/reporter.cjs +1 -1
- package/dist/reporter.mjs +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
}) : target, mod));
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region package.json
|
|
24
|
-
var version = "0.11.
|
|
24
|
+
var version = "0.11.1";
|
|
25
25
|
/** Generate a random 32-character hex trace ID. */
|
|
26
26
|
function generateTraceId() {
|
|
27
27
|
return Array.from({ length: 32 }, () => Math.floor(Math.random() * 16).toString(16)).join("");
|
|
@@ -259,18 +259,20 @@ function resolveDestinationKind(options) {
|
|
|
259
259
|
const envEndpoint = process.env[options.envEndpointName];
|
|
260
260
|
const envHeaders = process.env[options.envHeadersName];
|
|
261
261
|
if (envHeaders && !envEndpoint) throw new Error(`${options.envHeadersName} is set but ${options.envEndpointName} is not set.`);
|
|
262
|
-
|
|
262
|
+
let primaryDestination;
|
|
263
|
+
if (envEndpoint) primaryDestination = {
|
|
263
264
|
url: envEndpoint,
|
|
264
265
|
headers: parseOtlpHeaders(envHeaders)
|
|
265
|
-
}
|
|
266
|
-
if (options.singular)
|
|
266
|
+
};
|
|
267
|
+
else if (options.singular) primaryDestination = {
|
|
267
268
|
url: options.singular.url,
|
|
268
269
|
headers: { ...options.singular.headers }
|
|
269
|
-
}
|
|
270
|
-
|
|
270
|
+
};
|
|
271
|
+
const additionalDestinations = (options.plural ?? []).map((destination) => ({
|
|
271
272
|
url: destination.url,
|
|
272
273
|
headers: { ...destination.headers }
|
|
273
274
|
}));
|
|
275
|
+
return primaryDestination ? [primaryDestination, ...additionalDestinations] : additionalDestinations;
|
|
274
276
|
}
|
|
275
277
|
function resolveLegacyDestinationConfig(destination, headers) {
|
|
276
278
|
return typeof destination === "string" ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region package.json
|
|
2
|
-
var version = "0.11.
|
|
2
|
+
var version = "0.11.1";
|
|
3
3
|
/** Generate a random 32-character hex trace ID. */
|
|
4
4
|
function generateTraceId() {
|
|
5
5
|
return Array.from({ length: 32 }, () => Math.floor(Math.random() * 16).toString(16)).join("");
|
|
@@ -237,18 +237,20 @@ function resolveDestinationKind(options) {
|
|
|
237
237
|
const envEndpoint = process.env[options.envEndpointName];
|
|
238
238
|
const envHeaders = process.env[options.envHeadersName];
|
|
239
239
|
if (envHeaders && !envEndpoint) throw new Error(`${options.envHeadersName} is set but ${options.envEndpointName} is not set.`);
|
|
240
|
-
|
|
240
|
+
let primaryDestination;
|
|
241
|
+
if (envEndpoint) primaryDestination = {
|
|
241
242
|
url: envEndpoint,
|
|
242
243
|
headers: parseOtlpHeaders(envHeaders)
|
|
243
|
-
}
|
|
244
|
-
if (options.singular)
|
|
244
|
+
};
|
|
245
|
+
else if (options.singular) primaryDestination = {
|
|
245
246
|
url: options.singular.url,
|
|
246
247
|
headers: { ...options.singular.headers }
|
|
247
|
-
}
|
|
248
|
-
|
|
248
|
+
};
|
|
249
|
+
const additionalDestinations = (options.plural ?? []).map((destination) => ({
|
|
249
250
|
url: destination.url,
|
|
250
251
|
headers: { ...destination.headers }
|
|
251
252
|
}));
|
|
253
|
+
return primaryDestination ? [primaryDestination, ...additionalDestinations] : additionalDestinations;
|
|
252
254
|
}
|
|
253
255
|
function resolveLegacyDestinationConfig(destination, headers) {
|
|
254
256
|
return typeof destination === "string" ? {
|
package/dist/fixture.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_config = require("./config-
|
|
2
|
+
const require_config = require("./config-Dlhv7Jh9.cjs");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_config.__toESM(node_path, 1);
|
|
5
5
|
let _playwright_test = require("@playwright/test");
|
package/dist/fixture.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createTestTraceContext, l as generateSpanId, n as BROWSER_SERVICE_NAME, o as flushFixtureSpans, t as resolvePlaywrightOpentelemetryConfig } from "./config-
|
|
1
|
+
import { a as createTestTraceContext, l as generateSpanId, n as BROWSER_SERVICE_NAME, o as flushFixtureSpans, t as resolvePlaywrightOpentelemetryConfig } from "./config-vP1SpMPF.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { test as test$1 } from "@playwright/test";
|
|
4
4
|
export * from "@playwright/test";
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as buildOtlpRequest, d as sendSpans, i as TRACE_CONTEXT_ATTACHMENT_NAME, l as generateSpanId, r as FIXTURE_SPANS_ATTACHMENT_NAME, s as shouldRetainPlaywrightTrace, t as resolvePlaywrightOpentelemetryConfig, u as generateTraceId } from "./config-
|
|
1
|
+
import { c as buildOtlpRequest, d as sendSpans, i as TRACE_CONTEXT_ATTACHMENT_NAME, l as generateSpanId, r as FIXTURE_SPANS_ATTACHMENT_NAME, s as shouldRetainPlaywrightTrace, t as resolvePlaywrightOpentelemetryConfig, u as generateTraceId } from "./config-vP1SpMPF.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { BlobReader, BlobWriter, TextWriter, ZipReader, ZipWriter } from "@zip.js/zip.js";
|
package/dist/reporter.cjs
CHANGED
package/dist/reporter.mjs
CHANGED