Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset metrics on config change #437

Merged
merged 4 commits into from
Mar 26, 2022
Merged

Reset metrics on config change #437

merged 4 commits into from
Mar 26, 2022

Conversation

Kashkovsky
Copy link
Contributor

@Kashkovsky Kashkovsky commented Mar 26, 2022

Description

When the config is updated with new targets, metrics remain the same hence meaningless.
My little proposal is to reset metrics on each config update to get relevant information about current targets.
Sorry if anything is wrong, I learned Go yesterday.

Fixes # (issue)
N/A

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Run the program with config A
  • Update config
  • Observe Traffic and ProcessedTraffic metrics are reset.

IMG_0070

@arriven
Copy link
Owner

arriven commented Mar 26, 2022

Good idea, but can we make it a separate set of metrics instead? Ideally we'd show users both the general amount of traffic and traffic for latest targets as simple reset would probably be a bit confusing

@arriven
Copy link
Owner

arriven commented Mar 26, 2022

Thinking about it more, I'll probably merge it as is since everything else works as if the app was restarted when config changes

Copy link
Owner

@arriven arriven left a comment

Choose a reason for hiding this comment

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

Some minor comments

src/runner/runner.go Outdated Show resolved Hide resolved
src/runner/runner.go Outdated Show resolved Hide resolved
@Kashkovsky Kashkovsky requested a review from arriven March 26, 2022 13:48
@arriven arriven merged commit dd94570 into arriven:main Mar 26, 2022
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