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

feat: add prometheus metric #48

Merged
merged 3 commits into from
May 11, 2022
Merged

feat: add prometheus metric #48

merged 3 commits into from
May 11, 2022

Conversation

fatelei
Copy link
Collaborator

@fatelei fatelei commented May 9, 2022

ref: #25

Ⅰ. Describe what this PR did

add prometheus metric for dbpack. opentelemetry metric currently unstable
image

Ⅱ. Does this pull request fix one issue?

#25

Ⅲ. Why don't you add test cases (unit test/integration test)?

no need tests

Ⅳ. Describe how to verify it

in my computer, i verify it

Ⅴ. Special notes for reviews

connection metric filter config
image

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

cmd/cmd.go Show resolved Hide resolved
cmd/cmd.go Show resolved Hide resolved
@fatelei
Copy link
Collaborator Author

fatelei commented May 9, 2022

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request May 9, 2022
@fatelei fatelei force-pushed the dev_metric branch 3 times, most recently from 33a2862 to ddcff48 Compare May 10, 2022 09:00
@fatelei
Copy link
Collaborator Author

fatelei commented May 10, 2022

the test metric is below:

image

pkg/proto/interface.go Outdated Show resolved Hide resolved
pkg/filter/metrics/connection_metric.go Outdated Show resolved Hide resolved
pkg/filter/metrics/connection_metric.go Outdated Show resolved Hide resolved
@fatelei fatelei force-pushed the dev_metric branch 3 times, most recently from c004042 to 071b05d Compare May 10, 2022 10:22
@fatelei
Copy link
Collaborator Author

fatelei commented May 10, 2022

ConnectionMetricFilter should be add first position of filters array

Copy link
Collaborator

@dk-lockdown dk-lockdown left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2022

Codecov Report

Merging #48 (0f22829) into dev (feab7ae) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #48   +/-   ##
=======================================
  Coverage   34.22%   34.22%           
=======================================
  Files          42       42           
  Lines        4947     4947           
=======================================
  Hits         1693     1693           
  Misses       3085     3085           
  Partials      169      169           

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 feab7ae...0f22829. Read the comment docs.

doc/metric.md Show resolved Hide resolved
Copy link
Collaborator

@bohehe bohehe left a comment

Choose a reason for hiding this comment

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

LGTM

@zhu733756
Copy link
Contributor

LGTM

cmd/cmd.go Outdated Show resolved Hide resolved
@fatelei
Copy link
Collaborator Author

fatelei commented May 11, 2022

file formatted, i add go fmt on file save

@dk-lockdown dk-lockdown merged commit 627adc2 into CECTC:dev May 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants