Add Web IDE preview success metrics

What does this MR do and why?

Adds usage ping metrics to be emitted each time Web IDE Live Preview is successfully initialized.

Redis key is WEB_IDE_PREVIEWS_SUCCESS_COUNT

Screenshots or screen recordings

Screen_Shot_2022-01-21_at_6.40.28_PM

How to set up and validate locally

Create a project, and create the following files in the Web IDE:

index.html

<html>
<body>
<h1>THIS IS HTML!</h1>
</body>
</html>

package.json

{
 "name": "html",
  "version": "1.0.0",
  "description": "html",
  "main": "index.html"
}

Open the live preview - middle icon on right side of Web IDE.

Open Redis to check count was incremented:

$ redis-cli -s ~/workspace/gitlab-development-kit/redis/redis.socket
redis /Users/cwoolley/workspace/gitlab-development-kit/redis/redis.socket> GET WEB_IDE_PREVIEWS_SUCCESS_COUNT
"4"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

related: #349388

cc @pslaughter @ericschurter

Edited by Chad Woolley

Merge request reports

Loading