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

Support prometheus metrics #382

Merged
merged 4 commits into from
Sep 7, 2021
Merged

Conversation

luckyxiaoqiang
Copy link
Collaborator

Describe what this PR does / why we need it

Support prometheus metrics.

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jan 16, 2021

Codecov Report

Merging #382 (8043f49) into master (aafce3f) will decrease coverage by 0.09%.
The diff coverage is 32.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
- Coverage   51.42%   51.32%   -0.10%     
==========================================
  Files          70       70              
  Lines        4331     4353      +22     
==========================================
+ Hits         2227     2234       +7     
- Misses       1806     1821      +15     
  Partials      298      298              
Impacted Files Coverage Δ
api/init.go 0.00% <0.00%> (ø)
core/config/config.go 20.61% <0.00%> (-0.44%) ⬇️
core/config/entity.go 50.00% <0.00%> (-1.39%) ⬇️
core/system_metric/sys_metric_stat.go 15.74% <50.00%> (+1.58%) ⬆️
core/circuitbreaker/circuit_breaker.go 68.31% <100.00%> (+0.42%) ⬆️
core/flow/traffic_shaping.go 75.00% <100.00%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aafce3f...8043f49. Read the comment docs.

@louyuting louyuting added the area/metrics Issue related to metrics and monitoring label Jan 16, 2021
@louyuting louyuting added this to the 1.1.0 milestone Jan 16, 2021
core/stat/stat_slot.go Outdated Show resolved Hide resolved
@louyuting louyuting requested review from sczyh30 and removed request for sczyh30 February 22, 2021 13:35
core/config/entity.go Outdated Show resolved Hide resolved
core/stat/stat_slot.go Outdated Show resolved Hide resolved
@iDube
Copy link

iDube commented Mar 30, 2021

any progress on this feature?

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2021

Codecov Report

Merging #382 (4c7881d) into master (6b43fd2) will increase coverage by 2.10%.
The diff coverage is 34.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
+ Coverage   51.33%   53.43%   +2.10%     
==========================================
  Files          70       89      +19     
  Lines        4356     5820    +1464     
==========================================
+ Hits         2236     3110     +874     
- Misses       1818     2361     +543     
- Partials      302      349      +47     
Impacted Files Coverage Δ
api/init.go 0.00% <0.00%> (ø)
core/config/config.go 18.25% <0.00%> (-2.80%) ⬇️
core/config/entity.go 39.79% <0.00%> (-11.60%) ⬇️
core/system_metric/sys_metric_stat.go 17.55% <50.00%> (+3.40%) ⬆️
core/circuitbreaker/circuit_breaker.go 72.65% <100.00%> (+4.75%) ⬆️
core/flow/traffic_shaping.go 71.42% <100.00%> (ø)
core/circuitbreaker/stat_slot.go 0.00% <0.00%> (-25.00%) ⬇️
core/flow/standalone_stat_slot.go 50.00% <0.00%> (-25.00%) ⬇️
core/base/stat.go 38.70% <0.00%> (-13.68%) ⬇️
core/hotspot/slot.go 0.00% <0.00%> (-9.53%) ⬇️
... and 86 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b43fd2...4c7881d. Read the comment docs.

@sczyh30 sczyh30 added kind/feature Category issues or PRs related to feature request priority/high Very important, need to be worked with soon but not very urgent to-review PRs to review labels Aug 27, 2021
return &prometheusExporter{}
}

func (e *prometheusExporter) NewCounter(name, desc string, labelNames []string) Counter {
Copy link
Collaborator

Choose a reason for hiding this comment

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

In Prometheus/maine. go, directly implement NewCounter, NewGauge is that ok?

exporter/metric/exporter.go Show resolved Hide resolved
@luckyxiaoqiang
Copy link
Collaborator Author

Ping @louyuting @sczyh30

Copy link
Collaborator

@louyuting louyuting left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 removed the to-review PRs to review label Sep 7, 2021
Copy link
Collaborator

@binbin0325 binbin0325 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit d9b691b into alibaba:master Sep 7, 2021
@sczyh30
Copy link
Member

sczyh30 commented Sep 7, 2021

Nice work. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Issue related to metrics and monitoring kind/feature Category issues or PRs related to feature request priority/high Very important, need to be worked with soon but not very urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants