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

add Prometheus percentage metrics for httpserver & proxy #879

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

LokiWager
Copy link
Collaborator

Add Prometheus percentage metrics for HTTPServer & Proxy

  • add 3 metrics for HTTPServer
    • httpserver_requests_duration_percentage
    • httpserver_requests_size_bytes_percentage
    • httpserver_responses_size_bytes_percentage
  • add 2 metrics for Proxy
    • proxy_request_body_size_percentage
    • proxy_response_body_size_percentage

prometheus.SummaryOpts{
Name: "proxy_response_body_size_percentage",
Help: "a summary of the total size of the response.",
Objectives: map[float64]float64{
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the usage of this map?
as floating point numbers often can not be represented precisely, we must be cautious about using them as keys of maps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Objectives is Summary Bucket, which type is map[float64]float64.

I forgot to use the default Objectives here. Please, review it again.

@codecov-commenter
Copy link

Codecov Report

Base: 76.23% // Head: 75.80% // Decreases project coverage by -0.42% ⚠️

Coverage data is based on head (20f8049) compared to base (f99cd41).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
- Coverage   76.23%   75.80%   -0.43%     
==========================================
  Files         110      114       +4     
  Lines       12867    13387     +520     
==========================================
+ Hits         9809    10148     +339     
- Misses       2510     2663     +153     
- Partials      548      576      +28     
Impacted Files Coverage Δ
pkg/filters/proxy/pool.go 82.68% <100.00%> (+0.70%) ⬆️
pkg/object/httpserver/mux.go 80.88% <100.00%> (+0.19%) ⬆️
pkg/object/httpserver/runtime.go 68.50% <100.00%> (+2.16%) ⬆️
pkg/object/mqttproxy/topic.go 47.05% <0.00%> (-52.95%) ⬇️
pkg/object/mqttproxy/session.go 67.70% <0.00%> (-14.51%) ⬇️
pkg/object/mqttproxy/client.go 77.45% <0.00%> (-4.16%) ⬇️
pkg/object/mqttproxy/broker.go 73.75% <0.00%> (-1.05%) ⬇️
pkg/cluster/cluster.go 59.57% <0.00%> (-0.53%) ⬇️
pkg/object/mqttproxy/spec.go 100.00% <0.00%> (ø)
pkg/object/mqttproxy/mqttproxy.go 46.83% <0.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@localvar localvar merged commit 60cabb7 into easegress-io:main Dec 22, 2022
@LokiWager LokiWager deleted the add_pxx branch February 20, 2023 06:32
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.

None yet

4 participants