@lokalise/playwright-reporters 1.9.1 → 1.9.2

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.
@@ -10,8 +10,12 @@ export interface CIContext {
10
10
  commitSha?: string;
11
11
  /** Pull request number */
12
12
  prNumber?: string;
13
- /** CI job identifier */
13
+ /** CI job identifier (numeric ID) */
14
14
  ciJobId?: string;
15
+ /** CI job name (e.g., 'lokalise-main/PR-123') */
16
+ jobName?: string;
17
+ /** CI build number */
18
+ buildNumber?: string;
15
19
  /** What triggered the run (push, pr, schedule, manual) */
16
20
  triggeredBy?: string;
17
21
  }
@@ -172,4 +172,8 @@ export interface MetricTags {
172
172
  service?: string;
173
173
  /** Product identifier */
174
174
  product?: string;
175
+ /** CI job name (e.g., 'lokalise-main/PR-123') */
176
+ jobName?: string;
177
+ /** CI build number */
178
+ buildNumber?: string;
175
179
  }
@@ -236,6 +236,8 @@ class DatadogReporter {
236
236
  env: this.options.env,
237
237
  service: this.options.service ?? 'playwright-tests',
238
238
  product: this.options.product,
239
+ jobName: this.options.ci?.jobName,
240
+ buildNumber: this.options.ci?.buildNumber,
239
241
  };
240
242
  // Build metrics payload
241
243
  const payload = (0, transform_1.buildMetricsPayload)(runMetrics, this.testMetrics, baseTags);
@@ -33,6 +33,12 @@ const formatTags = (tags) => {
33
33
  if (tags.product) {
34
34
  formattedTags.push(`product:${tags.product}`);
35
35
  }
36
+ if (tags.jobName) {
37
+ formattedTags.push(`job_name:${tags.jobName}`);
38
+ }
39
+ if (tags.buildNumber) {
40
+ formattedTags.push(`build_number:${tags.buildNumber}`);
41
+ }
36
42
  return formattedTags;
37
43
  };
38
44
  exports.formatTags = formatTags;
@@ -100,10 +106,8 @@ const transformTestRunMetrics = (runMetrics, baseTags) => {
100
106
  if (runMetrics.navigationMs > 0) {
101
107
  series.push(createDistribution('test_run.navigation_ms', runMetrics.navigationMs, timestamp, tags, 'millisecond'));
102
108
  }
103
- // Retry time
104
- if (runMetrics.retryTimeMs > 0) {
105
- series.push(createDistribution('test_run.retry_time_ms', runMetrics.retryTimeMs, timestamp, tags, 'millisecond'));
106
- }
109
+ // Retry time - always send for consistent dashboard visibility (0 means no retries)
110
+ series.push(createDistribution('test_run.retry_time_ms', runMetrics.retryTimeMs, timestamp, tags, 'millisecond'));
107
111
  // Worker count
108
112
  if (runMetrics.workerCount > 0) {
109
113
  series.push(createGauge('test_run.worker_count', runMetrics.workerCount, timestamp, tags));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/playwright-reporters",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "scripts": {
5
5
  "lint:eslint": "eslint --cache . --ext .js,.cjs,.ts",
6
6
  "lint:ts": "tsc --noEmit",