Custom metrics for playwright monitors #511

Closed
opened 2026-04-05 16:20:10 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @sevensolutions on 4/9/2025

Is your feature request related to a problem? Please describe.
I'am using playwright monitors to monitor some websites where i need the flexibility to measure individual durations. Like login-duration, page-load duration etc.

Describe the solution you'd like
At the moment, a playwright test can only return a single value. It will be cool if i can return multiple values (metrics), which i can then use to attach some alerting rules to.
Each metric should also be shown in the overview (last value) and in the metrics tab (history).

Example API:

return {
    metrics: {
      loginDuration: endTime - startTime,
      pageLoadDuration: endTime2 - startTime2
    },
    screenshots: screenshots
};

Describe alternatives you've considered
At the moment i'am only using the single return value but i'am a little bit limited.

*Originally created by @sevensolutions on 4/9/2025* **Is your feature request related to a problem? Please describe.** I'am using playwright monitors to monitor some websites where i need the flexibility to measure individual durations. Like login-duration, page-load duration etc. **Describe the solution you'd like** At the moment, a playwright test can only return a single value. It will be cool if i can return multiple values (metrics), which i can then use to attach some alerting rules to. Each metric should also be shown in the overview (last value) and in the metrics tab (history). Example API: ```js return { metrics: { loginDuration: endTime - startTime, pageLoadDuration: endTime2 - startTime2 }, screenshots: screenshots }; ``` **Describe alternatives you've considered** At the moment i'am only using the single return value but i'am a little bit limited.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#511