Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

metrics PoC for github.com/armon/go-metrics #2884

Merged
merged 8 commits into from
Mar 28, 2023

Conversation

ryanfkeepers
Copy link
Contributor

Adds a logger-oriented metrics tracker to aggregate statistics like requests-per-minute and average
http request time.


Does this PR need a docs update or release note?

  • ⛔ No

Type of change

  • 🤖 Supportability/Tests

Issue(s)

Test Plan

  • 💪 Manual

@aviator-app
Copy link
Contributor

aviator-app bot commented Mar 20, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.

@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:30 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:30 — with GitHub Actions Inactive
@ryanfkeepers
Copy link
Contributor Author

Average output, currently on a 1 minute interval:

16:18:10.07	WARN	[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.total_gc_runs': 13.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.num_goroutines': 292.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.alloc_bytes': 59980688.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.sys_bytes': 194733104.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.malloc_count': 4082038.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.free_count': 3895006.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.heap_objects': 187032.000
[2023-03-20 16:17:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.total_gc_pause_ns': 2041878.000
[2023-03-20 16:17:00 -0600 MDT][C] 'api_call': Count: 251 Sum: 251.000 LastUpdated: 2023-03-20 16:17:59.951317 -0600 MDT m=+109.898305918
[2023-03-20 16:17:00 -0600 MDT][S] 'api_call': Count: 246 Min: 85.000 Mean: 189.980 Max: 1598.000 Stddev: 120.772 Sum: 46735.000 LastUpdated: 2023-03-20 16:17:59.950246 -0600 MDT m=+109.897234418
[2023-03-20 16:17:00 -0600 MDT][S] 'corso.runtime.gc_pause_ns': Count: 7 Min: 92041.000 Mean: 164637.143 Max: 197458.000 Stddev: 37392.482 Sum: 1152460.000 LastUpdated: 2023-03-20 16:17:59.210719 -0600 MDT m=+109.157707043

16:19:10.06	WARN	[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.heap_objects': 258246.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.total_gc_pause_ns': 4967045.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.total_gc_runs': 22.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.num_goroutines': 111.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.alloc_bytes': 57080576.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.sys_bytes': 194733104.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.malloc_count': 7158732.000
[2023-03-20 16:18:00 -0600 MDT][G] 'corso.Ryans-MBP.runtime.free_count': 6900486.000
[2023-03-20 16:18:00 -0600 MDT][C] 'api_call': Count: 2052 Sum: 2052.000 LastUpdated: 2023-03-20 16:18:59.974432 -0600 MDT m=+169.921475793
[2023-03-20 16:18:00 -0600 MDT][S] 'api_call': Count: 2054 Min: 88.000 Mean: 112.256 Max: 1324.000 Stddev: 61.006 Sum: 230573.000 LastUpdated: 2023-03-20 16:18:59.973682 -0600 MDT m=+169.920725876
[2023-03-20 16:18:00 -0600 MDT][S] 'corso.runtime.gc_pause_ns': Count: 9 Min: 92583.000 Mean: 325018.556 Max: 1283792.000 Stddev: 363904.188 Sum: 2925167.000 LastUpdated: 2023-03-20 16:18:56.277573 -0600 MDT m=+166.224613459

@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:38 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:56 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:56 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:56 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 20, 2023 22:56 — with GitHub Actions Inactive
Copy link
Contributor

@vkamra vkamra left a comment

Choose a reason for hiding this comment

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

LGTM. Can approve once you're ready with final version to merge

src/cli/cli.go Outdated Show resolved Hide resolved
src/internal/events/events.go Outdated Show resolved Hide resolved
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 00:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 00:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 00:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 00:32 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 00:32 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 17:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 17:31 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 21, 2023 17:31 — with GitHub Actions Inactive
@aviator-app aviator-app bot temporarily deployed to Testing March 27, 2023 18:54 Inactive
@aviator-app aviator-app bot temporarily deployed to Testing March 27, 2023 18:54 Inactive
@aviator-app aviator-app bot temporarily deployed to Testing March 27, 2023 18:54 Inactive
@aviator-app aviator-app bot added the blocked Upstream item prevents completion label Mar 27, 2023
@aviator-app
Copy link
Contributor

aviator-app bot commented Mar 27, 2023

This pull request failed to merge: some CI status(es) failed. Remove the blocked label to re-queue.

Failed CI(s): Test-Suite-Trusted

@ryanfkeepers ryanfkeepers removed the blocked Upstream item prevents completion label Mar 27, 2023
@aviator-app aviator-app bot added the blocked Upstream item prevents completion label Mar 28, 2023
@aviator-app
Copy link
Contributor

aviator-app bot commented Mar 28, 2023

This pull request failed to merge: merge conflict detected, please resolve manually and requeue. Remove the blocked label to re-queue.

Additional debug info: Failed to merge changes from the base branch into this PR. You will probably need to merge the latest changes from the base branch into the PR branch and manually resolve conflicts).

Adds a logger-oriented metrics tracker to aggregate
statistics like requests-per-minute and average
http request time.
- use global metrics instance
- add a metrics middleware
- add per-response-status metrics
- migrate metrics flusher to operations
@ryanfkeepers ryanfkeepers removed the blocked Upstream item prevents completion label Mar 28, 2023
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:17 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:17 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:17 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:25 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:25 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:25 — with GitHub Actions Inactive
@ryanfkeepers ryanfkeepers temporarily deployed to Testing March 28, 2023 15:25 — with GitHub Actions Inactive
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@aviator-app aviator-app bot merged commit 9f0e259 into main Mar 28, 2023
@aviator-app aviator-app bot deleted the 2212-hashio-poc branch March 28, 2023 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants