atlassian / atlassian/escalator

Move metrics inside controller (not global)

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
685
Forks
68
Avg merge
47m
Merged PRs (30d)
1

Description

At the moment, metrics are global and can be used by just calling `metrics.`. They should ideally be part of the controller package. This will make it easier in the future when we will need to test the controller package, we can easily mock out the metrics provider.

Contributor guide

Open the contributing guide

Research direction

Start by locating the controller package and the current global metrics provider, then trace where metrics. is called. Move the metrics dependency into the controller package so it can be mocked there, and verify that controller behavior and existing metrics usage remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.