Skip to content

ROX-28151: Phonehome telemetry for custom Prometheus metrics#15487

Merged
parametalol merged 3 commits intomasterfrom
michael/ROX-28326-phonehome-telemetry
Sep 26, 2025
Merged

ROX-28151: Phonehome telemetry for custom Prometheus metrics#15487
parametalol merged 3 commits intomasterfrom
michael/ROX-28326-phonehome-telemetry

Conversation

@parametalol
Copy link
Copy Markdown
Contributor

@parametalol parametalol commented May 29, 2025

Description

Track the event of the metrics configuration with provided related central identity properties.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Segment:

{
  "anonymousId": "252d4cd4-9f59-499b-9b24-9ce485d4291f",
  "context": {
    "app": {
      "build": "development",
      "version": "4.9.x-95-g586a4a7736"
    },
    "device": {
      "id": "252d4cd4-9f59-499b-9b24-9ce485d4291f",
      "type": "Central Server",
      "version": "4.9.x-95-g586a4a7736"
    },
    "library": {
      "name": "analytics-go",
      "version": "3.0.0"
    },
    "traits": {
      "Total custom Prometheus registries": 1
    },
    "userAgent": "Rox Central/4.9.x-95-g586a4a7736 (linux; amd64)"
  },
  "event": "Served custom Prometheus metrics",
  "integrations": {},
  "messageId": "prom_registries-302d377998730586",
  "originalTimestamp": "2025-07-28T14:31:52.381788392Z",
  "receivedAt": "2025-07-28T14:31:52.474Z",
  "sentAt": "2025-07-28T14:31:52.381Z",
  "timestamp": "2025-07-28T14:31:52.474Z",
  "type": "track"
}
{
  "anonymousId": "252d4cd4-9f59-499b-9b24-9ce485d4291f",
  "context": {
    "app": {
      "build": "development",
      "version": "4.9.x-95-g586a4a7736"
    },
    "device": {
      "id": "252d4cd4-9f59-499b-9b24-9ce485d4291f",
      "type": "Central Server",
      "version": "4.9.x-95-g586a4a7736"
    },
    "library": {
      "name": "analytics-go",
      "version": "3.0.0"
    },
    "traits": {
      "Total Vulnerabilities metrics": 1,
      "Vulnerabilities gathering seconds": 18,
      "Vulnerabilities metrics labels": [
        "Cluster",
        "Namespace",
        "Severity"
      ]
    },
    "userAgent": "Rox Central/4.9.x-95-g586a4a7736 (linux; amd64)"
  },
  "event": "Vulnerabilities metrics gathered",
  "integrations": {},
  "messageId": "vulnerabilities-59b748ba9941891",
  "originalTimestamp": "2025-07-28T14:34:53.642275995Z",
  "receivedAt": "2025-07-28T14:34:53.813Z",
  "sentAt": "2025-07-28T14:34:53.642Z",
  "timestamp": "2025-07-28T14:34:53.813Z",
  "type": "track"
}

Amplitude user view:
image

Current dependencies on/for this PR:

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented May 29, 2025

Images are ready for the commit at 4d905ba.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-898-g4d905ba539.

@codecov
Copy link
Copy Markdown

codecov bot commented May 29, 2025

Codecov Report

❌ Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.78%. Comparing base (90956bf) to head (4d905ba).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
central/metrics/custom_registry.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15487      +/-   ##
==========================================
- Coverage   48.81%   48.78%   -0.04%     
==========================================
  Files        2698     2701       +3     
  Lines      201661   201908     +247     
==========================================
+ Hits        98449    98499      +50     
- Misses      95448    95646     +198     
+ Partials     7764     7763       -1     
Flag Coverage Δ
go-unit-tests 48.78% <88.57%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch 2 times, most recently from 6212deb to fc56f92 Compare June 3, 2025 14:22
@parametalol parametalol force-pushed the michael/ROX-28326-expose-cve-metrics branch from db52b78 to be8a8cf Compare June 4, 2025 08:57
@parametalol parametalol requested a review from a team as a code owner June 4, 2025 08:57
@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch from fc56f92 to 44efd12 Compare June 16, 2025 13:52
@parametalol parametalol requested review from a team and janisz as code owners June 16, 2025 13:52
@parametalol parametalol requested review from mclasmeier and removed request for a team June 16, 2025 13:52
@parametalol parametalol changed the base branch from michael/ROX-28326-expose-cve-metrics to michael/ROX-28151-runner June 16, 2025 13:53
@parametalol parametalol changed the title ROX-28151: track metrics configuration ROX-28151: Phonehome telemetry for custom Prometheus metrics Jun 16, 2025
@RTann RTann removed the request for review from a team June 16, 2025 17:25
@parametalol parametalol marked this pull request as draft June 17, 2025 13:16
@parametalol parametalol force-pushed the michael/ROX-28151-cached-user-registry branch from 5f63d54 to 8f83cd6 Compare August 18, 2025 16:10
@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch from 586a4a7 to 7a99ccb Compare August 18, 2025 16:34
@parametalol parametalol force-pushed the michael/ROX-28151-cached-user-registry branch 3 times, most recently from d1e3217 to 19b236f Compare September 5, 2025 12:27
@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch from 7a99ccb to 68f8fe2 Compare September 8, 2025 09:08
@parametalol parametalol force-pushed the michael/ROX-28151-cached-user-registry branch 4 times, most recently from 718e3ca to 59ff74d Compare September 9, 2025 16:15
Base automatically changed from michael/ROX-28151-cached-user-registry to master September 9, 2025 18:27
@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch from 68f8fe2 to 585e1a4 Compare September 9, 2025 20:25
@parametalol parametalol marked this pull request as ready for review September 9, 2025 21:21
parametalol and others added 2 commits September 26, 2025 15:37
fix rebase

unused method removed
@parametalol parametalol force-pushed the michael/ROX-28326-phonehome-telemetry branch from 78c8e47 to bae6ab5 Compare September 26, 2025 13:43
@parametalol parametalol removed request for a team and mclasmeier September 26, 2025 14:47
Copy link
Copy Markdown
Collaborator

@stehessel stehessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than the one odd variable name

@parametalol parametalol enabled auto-merge (squash) September 26, 2025 15:57
@parametalol parametalol merged commit 5b3700d into master Sep 26, 2025
87 of 90 checks passed
@parametalol parametalol deleted the michael/ROX-28326-phonehome-telemetry branch September 26, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants