Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@rozzilla
Copy link
Contributor

@rozzilla rozzilla commented Jul 14, 2025

Simplify the code in the metrics.ts file to make it easier to add new metrics by:

  • moving non-metrics code to a dedicated file/test
  • creating generic methods to instantiate and add metric values
  • adding more strict types to reduce the chance of introducing regressions when adding new metrics

@rozzilla rozzilla force-pushed the feat/backend/refactor branch 2 times, most recently from eea2ad9 to 06fa085 Compare July 15, 2025 09:37
web/backend/utils/metrics.ts Show resolved Hide resolved
web/backend/utils/metrics.ts Outdated Show resolved Hide resolved
@rozzilla rozzilla requested a review from mcollina July 15, 2025 15:33
Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

chore(backend): migrate bytes logic

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

chore(backend): migrate rps logic

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

chore(backend): rename metrics method

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

fix

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

chore(init metrics response split to one line

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>

update

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
@rozzilla rozzilla force-pushed the feat/backend/refactor branch from 1bcad4a to 31540dd Compare July 16, 2025 09:05
@rozzilla
Copy link
Contributor Author

@mcollina refactor completed 👍🏼 feel free to have a look

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 54743eb into platformatic:main Jul 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.