playwright-opentelemetry 0.13.4 → 0.13.6
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-BWKPk3M6.mjs → config-CNqq0WLw.mjs} +48 -17
- package/dist/{config-Dn6tBEt9.cjs → config-knifnJua.cjs} +48 -17
- package/dist/fixture.cjs +3 -3
- package/dist/fixture.d.cts +2 -2
- package/dist/fixture.d.mts +2 -2
- package/dist/fixture.mjs +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/otel-D0ztpic2.d.cts +25 -0
- package/dist/otel-D0ztpic2.d.mts +25 -0
- package/dist/{reporter-B74q2438.cjs → reporter-CzP9uSdk.cjs} +1 -1
- package/dist/{reporter-DTztufc8.mjs → reporter-DCwosQMM.mjs} +1 -1
- package/dist/{reporter-CLzdtg6G.d.cts → reporter-DaCojFom.d.cts} +1 -25
- package/dist/{reporter-CLzdtg6G.d.mts → reporter-DaCojFom.d.mts} +1 -25
- package/dist/reporter.cjs +1 -1
- package/dist/reporter.d.cts +1 -1
- package/dist/reporter.d.mts +1 -1
- package/dist/reporter.mjs +1 -1
- package/package.json +1 -1
- /package/dist/{index-DhuwcBzL.d.cts → config-DhuwcBzL.d.cts} +0 -0
- /package/dist/{index-DhuwcBzL.d.mts → config-DhuwcBzL.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region package.json
|
|
2
|
-
var version = "0.13.
|
|
2
|
+
var version = "0.13.6";
|
|
3
3
|
const PLAYWRIGHT_TRACE_API_SOURCE_HEADER = "x-playwright-otel-source";
|
|
4
4
|
const PLAYWRIGHT_TRACE_API_SOURCE_REPORTER = "reporter";
|
|
5
5
|
function withPlaywrightTraceApiHeaders(headers) {
|
|
@@ -111,17 +111,37 @@ async function sendSpans(spans, options) {
|
|
|
111
111
|
if (spans.length === 0) return;
|
|
112
112
|
const body = JSON.stringify(buildOtlpRequest(spans, options.playwrightVersion));
|
|
113
113
|
if (options.debug) console.log("Sending spans to", options.tracesEndpoint);
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
for (const retryDelayMs of [...options.retryDelaysMs ?? [], null]) {
|
|
115
|
+
const failure = await postSpans(body, options);
|
|
116
|
+
if (!failure) return;
|
|
117
|
+
if (retryDelayMs === null || !failure.retryable) throw failure.error;
|
|
118
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async function postSpans(body, options) {
|
|
122
|
+
try {
|
|
123
|
+
const response = await fetch(options.tracesEndpoint, {
|
|
124
|
+
method: "POST",
|
|
125
|
+
body,
|
|
126
|
+
headers: {
|
|
127
|
+
"content-type": "application/json",
|
|
128
|
+
...options.headers || {}
|
|
129
|
+
},
|
|
130
|
+
...options.requestTimeoutMs && { signal: AbortSignal.timeout(options.requestTimeoutMs) }
|
|
131
|
+
});
|
|
132
|
+
if (response.ok) return null;
|
|
123
133
|
const error = await response.text();
|
|
124
|
-
|
|
134
|
+
const isThrottled = response.status === 429;
|
|
135
|
+
const isServerError = response.status >= 500;
|
|
136
|
+
return {
|
|
137
|
+
error: /* @__PURE__ */ new Error(`Failed to send spans: ${response.status} ${response.statusText}, ${error}`),
|
|
138
|
+
retryable: isThrottled || isServerError
|
|
139
|
+
};
|
|
140
|
+
} catch (error) {
|
|
141
|
+
return {
|
|
142
|
+
error,
|
|
143
|
+
retryable: true
|
|
144
|
+
};
|
|
125
145
|
}
|
|
126
146
|
}
|
|
127
147
|
//#endregion
|
|
@@ -163,6 +183,8 @@ function normalizeTraceMode(trace) {
|
|
|
163
183
|
const TRACE_CONTEXT_ATTACHMENT_NAME = "playwright-opentelemetry-trace-context";
|
|
164
184
|
const FIXTURE_SPANS_ATTACHMENT_NAME = "playwright-opentelemetry-fixture-spans";
|
|
165
185
|
const BROWSER_SERVICE_NAME = "playwright-browser";
|
|
186
|
+
const FIXTURE_EXPORT_RETRY_DELAYS_MS = [250, 750];
|
|
187
|
+
const FIXTURE_EXPORT_REQUEST_TIMEOUT_MS = 3e3;
|
|
166
188
|
async function createTestTraceContext(testInfo) {
|
|
167
189
|
const traceContext = {
|
|
168
190
|
traceId: generateTraceId(),
|
|
@@ -214,12 +236,21 @@ async function flushFixtureSpans(traceContext, config, options) {
|
|
|
214
236
|
});
|
|
215
237
|
const destinations = fixtureSpanDestinations(config, shouldRetainTrace);
|
|
216
238
|
if (destinations.length === 0) return;
|
|
217
|
-
await Promise.all(destinations.map((destination) =>
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
239
|
+
const failures = await Promise.all(destinations.map(async (destination) => {
|
|
240
|
+
try {
|
|
241
|
+
await sendSpans(traceContext.spans, {
|
|
242
|
+
tracesEndpoint: destination.tracesEndpoint,
|
|
243
|
+
headers: destination.headers,
|
|
244
|
+
playwrightVersion: "unknown",
|
|
245
|
+
debug: config.debug,
|
|
246
|
+
retryDelaysMs: FIXTURE_EXPORT_RETRY_DELAYS_MS,
|
|
247
|
+
requestTimeoutMs: FIXTURE_EXPORT_REQUEST_TIMEOUT_MS
|
|
248
|
+
});
|
|
249
|
+
} catch (error) {
|
|
250
|
+
return `${destination.tracesEndpoint}: ${error instanceof Error ? error.message : String(error)}`;
|
|
251
|
+
}
|
|
252
|
+
}));
|
|
253
|
+
for (const failure of failures) if (failure) console.warn(`Failed to export fixture spans for trace ${traceContext.traceId}: ${failure}`);
|
|
223
254
|
}
|
|
224
255
|
function serializeSpanForAttachment(span) {
|
|
225
256
|
return {
|
|
@@ -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.13.
|
|
24
|
+
var version = "0.13.6";
|
|
25
25
|
const PLAYWRIGHT_TRACE_API_SOURCE_HEADER = "x-playwright-otel-source";
|
|
26
26
|
const PLAYWRIGHT_TRACE_API_SOURCE_REPORTER = "reporter";
|
|
27
27
|
function withPlaywrightTraceApiHeaders(headers) {
|
|
@@ -133,17 +133,37 @@ async function sendSpans(spans, options) {
|
|
|
133
133
|
if (spans.length === 0) return;
|
|
134
134
|
const body = JSON.stringify(buildOtlpRequest(spans, options.playwrightVersion));
|
|
135
135
|
if (options.debug) console.log("Sending spans to", options.tracesEndpoint);
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
for (const retryDelayMs of [...options.retryDelaysMs ?? [], null]) {
|
|
137
|
+
const failure = await postSpans(body, options);
|
|
138
|
+
if (!failure) return;
|
|
139
|
+
if (retryDelayMs === null || !failure.retryable) throw failure.error;
|
|
140
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function postSpans(body, options) {
|
|
144
|
+
try {
|
|
145
|
+
const response = await fetch(options.tracesEndpoint, {
|
|
146
|
+
method: "POST",
|
|
147
|
+
body,
|
|
148
|
+
headers: {
|
|
149
|
+
"content-type": "application/json",
|
|
150
|
+
...options.headers || {}
|
|
151
|
+
},
|
|
152
|
+
...options.requestTimeoutMs && { signal: AbortSignal.timeout(options.requestTimeoutMs) }
|
|
153
|
+
});
|
|
154
|
+
if (response.ok) return null;
|
|
145
155
|
const error = await response.text();
|
|
146
|
-
|
|
156
|
+
const isThrottled = response.status === 429;
|
|
157
|
+
const isServerError = response.status >= 500;
|
|
158
|
+
return {
|
|
159
|
+
error: /* @__PURE__ */ new Error(`Failed to send spans: ${response.status} ${response.statusText}, ${error}`),
|
|
160
|
+
retryable: isThrottled || isServerError
|
|
161
|
+
};
|
|
162
|
+
} catch (error) {
|
|
163
|
+
return {
|
|
164
|
+
error,
|
|
165
|
+
retryable: true
|
|
166
|
+
};
|
|
147
167
|
}
|
|
148
168
|
}
|
|
149
169
|
//#endregion
|
|
@@ -185,6 +205,8 @@ function normalizeTraceMode(trace) {
|
|
|
185
205
|
const TRACE_CONTEXT_ATTACHMENT_NAME = "playwright-opentelemetry-trace-context";
|
|
186
206
|
const FIXTURE_SPANS_ATTACHMENT_NAME = "playwright-opentelemetry-fixture-spans";
|
|
187
207
|
const BROWSER_SERVICE_NAME = "playwright-browser";
|
|
208
|
+
const FIXTURE_EXPORT_RETRY_DELAYS_MS = [250, 750];
|
|
209
|
+
const FIXTURE_EXPORT_REQUEST_TIMEOUT_MS = 3e3;
|
|
188
210
|
async function createTestTraceContext(testInfo) {
|
|
189
211
|
const traceContext = {
|
|
190
212
|
traceId: generateTraceId(),
|
|
@@ -236,12 +258,21 @@ async function flushFixtureSpans(traceContext, config, options) {
|
|
|
236
258
|
});
|
|
237
259
|
const destinations = fixtureSpanDestinations(config, shouldRetainTrace);
|
|
238
260
|
if (destinations.length === 0) return;
|
|
239
|
-
await Promise.all(destinations.map((destination) =>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
261
|
+
const failures = await Promise.all(destinations.map(async (destination) => {
|
|
262
|
+
try {
|
|
263
|
+
await sendSpans(traceContext.spans, {
|
|
264
|
+
tracesEndpoint: destination.tracesEndpoint,
|
|
265
|
+
headers: destination.headers,
|
|
266
|
+
playwrightVersion: "unknown",
|
|
267
|
+
debug: config.debug,
|
|
268
|
+
retryDelaysMs: FIXTURE_EXPORT_RETRY_DELAYS_MS,
|
|
269
|
+
requestTimeoutMs: FIXTURE_EXPORT_REQUEST_TIMEOUT_MS
|
|
270
|
+
});
|
|
271
|
+
} catch (error) {
|
|
272
|
+
return `${destination.tracesEndpoint}: ${error instanceof Error ? error.message : String(error)}`;
|
|
273
|
+
}
|
|
274
|
+
}));
|
|
275
|
+
for (const failure of failures) if (failure) console.warn(`Failed to export fixture spans for trace ${traceContext.traceId}: ${failure}`);
|
|
245
276
|
}
|
|
246
277
|
function serializeSpanForAttachment(span) {
|
|
247
278
|
return {
|
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-knifnJua.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");
|
|
@@ -707,9 +707,9 @@ function createPlaywrightOtelTest(testBase) {
|
|
|
707
707
|
});
|
|
708
708
|
};
|
|
709
709
|
context.on("request", captureRequest);
|
|
710
|
-
await context.route("**", async (route, request) => {
|
|
710
|
+
if (config.propagateTraceHeaders) await context.route("**", async (route, request) => {
|
|
711
711
|
const requestContext = testTraceContext.requestContexts.get(request);
|
|
712
|
-
if (
|
|
712
|
+
if (requestContext) {
|
|
713
713
|
await propagateRouteTraceHeaders({
|
|
714
714
|
route,
|
|
715
715
|
request,
|
package/dist/fixture.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
1
|
+
import { i as PlaywrightTraceOption, n as PlaywrightOpentelemetryDestination, r as PlaywrightOpentelemetryUseOptions, t as PlaywrightOpentelemetryConfig } from "./config-DhuwcBzL.cjs";
|
|
2
|
+
import { n as SpanEvent, t as Span } from "./otel-D0ztpic2.cjs";
|
|
3
3
|
import { ConsoleMessage, Page, Request } from "@playwright/test";
|
|
4
4
|
export * from "@playwright/test";
|
|
5
5
|
|
package/dist/fixture.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
1
|
+
import { i as PlaywrightTraceOption, n as PlaywrightOpentelemetryDestination, r as PlaywrightOpentelemetryUseOptions, t as PlaywrightOpentelemetryConfig } from "./config-DhuwcBzL.mjs";
|
|
2
|
+
import { n as SpanEvent, t as Span } from "./otel-D0ztpic2.mjs";
|
|
3
3
|
import { ConsoleMessage, Page, Request } from "@playwright/test";
|
|
4
4
|
export * from "@playwright/test";
|
|
5
5
|
|
package/dist/fixture.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createTestTraceContext, n as BROWSER_SERVICE_NAME, o as flushFixtureSpans, p as generateSpanId, s as registerExpectedTrace, t as resolvePlaywrightOpentelemetryConfig } from "./config-
|
|
1
|
+
import { a as createTestTraceContext, n as BROWSER_SERVICE_NAME, o as flushFixtureSpans, p as generateSpanId, s as registerExpectedTrace, t as resolvePlaywrightOpentelemetryConfig } from "./config-CNqq0WLw.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { test as test$1 } from "@playwright/test";
|
|
4
4
|
export * from "@playwright/test";
|
|
@@ -706,9 +706,9 @@ function createPlaywrightOtelTest(testBase) {
|
|
|
706
706
|
});
|
|
707
707
|
};
|
|
708
708
|
context.on("request", captureRequest);
|
|
709
|
-
await context.route("**", async (route, request) => {
|
|
709
|
+
if (config.propagateTraceHeaders) await context.route("**", async (route, request) => {
|
|
710
710
|
const requestContext = testTraceContext.requestContexts.get(request);
|
|
711
|
-
if (
|
|
711
|
+
if (requestContext) {
|
|
712
712
|
await propagateRouteTraceHeaders({
|
|
713
713
|
route,
|
|
714
714
|
request,
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { i as PlaywrightTraceOption, n as PlaywrightOpentelemetryDestination, r as PlaywrightOpentelemetryUseOptions, t as PlaywrightOpentelemetryConfig } from "./config-DhuwcBzL.cjs";
|
|
2
|
+
import { t as PlaywrightOpentelemetryReporter } from "./reporter-DaCojFom.cjs";
|
|
3
3
|
export { type PlaywrightOpentelemetryConfig, type PlaywrightOpentelemetryDestination, type PlaywrightOpentelemetryUseOptions, type PlaywrightTraceOption, PlaywrightOpentelemetryReporter as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { i as PlaywrightTraceOption, n as PlaywrightOpentelemetryDestination, r as PlaywrightOpentelemetryUseOptions, t as PlaywrightOpentelemetryConfig } from "./config-DhuwcBzL.mjs";
|
|
2
|
+
import { t as PlaywrightOpentelemetryReporter } from "./reporter-DaCojFom.mjs";
|
|
3
3
|
export { type PlaywrightOpentelemetryConfig, type PlaywrightOpentelemetryDestination, type PlaywrightOpentelemetryUseOptions, type PlaywrightTraceOption, PlaywrightOpentelemetryReporter as default };
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/shared/otel.d.ts
|
|
2
|
+
type SpanAttributeValue = string | number | boolean | string[];
|
|
3
|
+
type SpanEvent = {
|
|
4
|
+
name: string;
|
|
5
|
+
time: Date;
|
|
6
|
+
attributes?: Record<string, SpanAttributeValue>;
|
|
7
|
+
};
|
|
8
|
+
type Span = {
|
|
9
|
+
traceId: string;
|
|
10
|
+
spanId: string;
|
|
11
|
+
parentSpanId?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
startTime: Date;
|
|
14
|
+
endTime: Date;
|
|
15
|
+
attributes: Record<string, SpanAttributeValue>;
|
|
16
|
+
events?: SpanEvent[];
|
|
17
|
+
status?: {
|
|
18
|
+
code: number;
|
|
19
|
+
message?: string;
|
|
20
|
+
};
|
|
21
|
+
kind?: number; /** Service name for this span (if different from default). */
|
|
22
|
+
serviceName?: string;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { SpanEvent as n, Span as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/shared/otel.d.ts
|
|
2
|
+
type SpanAttributeValue = string | number | boolean | string[];
|
|
3
|
+
type SpanEvent = {
|
|
4
|
+
name: string;
|
|
5
|
+
time: Date;
|
|
6
|
+
attributes?: Record<string, SpanAttributeValue>;
|
|
7
|
+
};
|
|
8
|
+
type Span = {
|
|
9
|
+
traceId: string;
|
|
10
|
+
spanId: string;
|
|
11
|
+
parentSpanId?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
startTime: Date;
|
|
14
|
+
endTime: Date;
|
|
15
|
+
attributes: Record<string, SpanAttributeValue>;
|
|
16
|
+
events?: SpanEvent[];
|
|
17
|
+
status?: {
|
|
18
|
+
code: number;
|
|
19
|
+
message?: string;
|
|
20
|
+
};
|
|
21
|
+
kind?: number; /** Service name for this span (if different from default). */
|
|
22
|
+
serviceName?: string;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { SpanEvent as n, Span as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as shouldRetainPlaywrightTrace, d as PLAYWRIGHT_TRACE_API_SOURCE_REPORTER, f as buildOtlpRequest, g as withPlaywrightTraceApiHeaders, h as sendSpans, i as TRACE_CONTEXT_ATTACHMENT_NAME, l as filterRetainedDestinations, m as generateTraceId, p as generateSpanId, r as FIXTURE_SPANS_ATTACHMENT_NAME, t as resolvePlaywrightOpentelemetryConfig, u as PLAYWRIGHT_TRACE_API_SOURCE_HEADER } from "./config-
|
|
1
|
+
import { c as shouldRetainPlaywrightTrace, d as PLAYWRIGHT_TRACE_API_SOURCE_REPORTER, f as buildOtlpRequest, g as withPlaywrightTraceApiHeaders, h as sendSpans, i as TRACE_CONTEXT_ATTACHMENT_NAME, l as filterRetainedDestinations, m as generateTraceId, p as generateSpanId, r as FIXTURE_SPANS_ATTACHMENT_NAME, t as resolvePlaywrightOpentelemetryConfig, u as PLAYWRIGHT_TRACE_API_SOURCE_HEADER } from "./config-CNqq0WLw.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";
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
import { FullConfig, FullResult, Reporter, Suite, TestCase, TestResult, TestStep } from "@playwright/test/reporter";
|
|
2
2
|
|
|
3
|
-
//#region src/shared/otel.d.ts
|
|
4
|
-
type SpanAttributeValue = string | number | boolean | string[];
|
|
5
|
-
type SpanEvent = {
|
|
6
|
-
name: string;
|
|
7
|
-
time: Date;
|
|
8
|
-
attributes?: Record<string, SpanAttributeValue>;
|
|
9
|
-
};
|
|
10
|
-
type Span = {
|
|
11
|
-
traceId: string;
|
|
12
|
-
spanId: string;
|
|
13
|
-
parentSpanId?: string;
|
|
14
|
-
name: string;
|
|
15
|
-
startTime: Date;
|
|
16
|
-
endTime: Date;
|
|
17
|
-
attributes: Record<string, SpanAttributeValue>;
|
|
18
|
-
events?: SpanEvent[];
|
|
19
|
-
status?: {
|
|
20
|
-
code: number;
|
|
21
|
-
message?: string;
|
|
22
|
-
};
|
|
23
|
-
kind?: number; /** Service name for this span (if different from default). */
|
|
24
|
-
serviceName?: string;
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
3
|
//#region src/reporter/reporter.d.ts
|
|
28
4
|
declare class PlaywrightOpentelemetryReporter implements Reporter {
|
|
29
5
|
private spanBatches;
|
|
@@ -46,4 +22,4 @@ declare class PlaywrightOpentelemetryReporter implements Reporter {
|
|
|
46
22
|
private sendScreenshotsZipToTraceApi;
|
|
47
23
|
}
|
|
48
24
|
//#endregion
|
|
49
|
-
export {
|
|
25
|
+
export { PlaywrightOpentelemetryReporter as t };
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
import { FullConfig, FullResult, Reporter, Suite, TestCase, TestResult, TestStep } from "@playwright/test/reporter";
|
|
2
2
|
|
|
3
|
-
//#region src/shared/otel.d.ts
|
|
4
|
-
type SpanAttributeValue = string | number | boolean | string[];
|
|
5
|
-
type SpanEvent = {
|
|
6
|
-
name: string;
|
|
7
|
-
time: Date;
|
|
8
|
-
attributes?: Record<string, SpanAttributeValue>;
|
|
9
|
-
};
|
|
10
|
-
type Span = {
|
|
11
|
-
traceId: string;
|
|
12
|
-
spanId: string;
|
|
13
|
-
parentSpanId?: string;
|
|
14
|
-
name: string;
|
|
15
|
-
startTime: Date;
|
|
16
|
-
endTime: Date;
|
|
17
|
-
attributes: Record<string, SpanAttributeValue>;
|
|
18
|
-
events?: SpanEvent[];
|
|
19
|
-
status?: {
|
|
20
|
-
code: number;
|
|
21
|
-
message?: string;
|
|
22
|
-
};
|
|
23
|
-
kind?: number; /** Service name for this span (if different from default). */
|
|
24
|
-
serviceName?: string;
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
3
|
//#region src/reporter/reporter.d.ts
|
|
28
4
|
declare class PlaywrightOpentelemetryReporter implements Reporter {
|
|
29
5
|
private spanBatches;
|
|
@@ -46,4 +22,4 @@ declare class PlaywrightOpentelemetryReporter implements Reporter {
|
|
|
46
22
|
private sendScreenshotsZipToTraceApi;
|
|
47
23
|
}
|
|
48
24
|
//#endregion
|
|
49
|
-
export {
|
|
25
|
+
export { PlaywrightOpentelemetryReporter as t };
|
package/dist/reporter.cjs
CHANGED
package/dist/reporter.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PlaywrightOpentelemetryReporter } from "./reporter-
|
|
1
|
+
import { t as PlaywrightOpentelemetryReporter } from "./reporter-DaCojFom.cjs";
|
|
2
2
|
export = PlaywrightOpentelemetryReporter;
|
package/dist/reporter.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PlaywrightOpentelemetryReporter } from "./reporter-
|
|
1
|
+
import { t as PlaywrightOpentelemetryReporter } from "./reporter-DaCojFom.mjs";
|
|
2
2
|
export { PlaywrightOpentelemetryReporter as default };
|
package/dist/reporter.mjs
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|