npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@orieken/saturday-playwright-otel-reporter

v0.1.4

Published

OpenTelemetry reporter for Playwright in the Saturday Framework

Downloads

46

Readme

@orieken/saturday-playwright-otel-reporter

An OpenTelemetry reporter for Playwright, integrated with the Saturday Framework. It instruments your Playwright tests with distributed tracing and metrics.

Features

  • Automatic Tracing: Captures Test, Step, and Hook execution as OTel spans.
  • Hierarchical Trace Context: Preserves the parent-child relationship of steps and fixtures within a test.
  • Status Reporting: Accurately maps Playwright test results to OTel Span Status codes (OK, ERROR).
  • Debugging Tools: Built-in support for debugging logs and payload inspection.

Installation

pnpm add -D @orieken/saturday-playwright-otel-reporter

Configuration

Add the reporter to your playwright.config.ts:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: process.env.ENABLE_OTEL === 'true' 
    ? [['list'], ['@orieken/saturday-playwright-otel-reporter']]
    : [['list']],
  // ...
});

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | ENABLE_OTEL | Set to true to activate the reporter | false | | OTEL_SERVICE_NAME | Name of the service | playwright-tests | | OTEL_EXPORTER_OTLP_ENDPOINT | OTLP HTTP Endpoint (Traces) | (required) | | OTEL_CUSTOM_CONFIG | Path to a custom configuration file. If not specified, looks for playwright-otel.config.mjs or playwright-otel.config.js in the project root. | - | | OTEL_SAVE_PAYLOADS | If true, saves the generated OTel spans to ./reports/otel-playwright-spans-<TIMESTAMP>.json | false | | OTEL_DEBUG_LOGGING | Set to true for verbose console output during test execution | false |

Custom Configuration

You can define a playwright-otel.config.mjs file in your project root to customize attributes:

export default {
  resourceAttributes: {
    'service.version': '1.0.0',
    'service.runner': 'playwright'
  },
  // Custom logic for adding attributes to tests
  testAttributes: (test) => {
    return {
      'custom.test.tags': test.tags ? test.tags.map(t => t.tag).join(',') : ''
    };
  }
};

Trace Attributes

The reporter automatically adds the following Resource Attributes:

  • test.reporter: playwright
  • test.browser: The browser name (if available)

Metrics

This reporter automatically collects the following metrics:

  • playwright.test.cases (Counter): Counts the number of executed test cases.
    • Labels: test.status, test.browser, test.file

Sample Queries (PromQL)

Total Pass/Fail Count per Browser:

sum by (test_status, test_browser) (playwright_test_cases_total)

Success Rate (%):

sum(playwright_test_cases_total{test_status="passed"}) / sum(playwright_test_cases_total) * 100