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(metrics): optimize metrics #27

Merged

Conversation

CoderPoet
Copy link
Collaborator

What type of PR is this?

feat(metrics): optimize metrics instrumentation

What this PR does / why we need it (English/Chinese):

en:

  1. add request count metric: record the number of client and server requests
  2. add route formatter: customize the value method of HTTP route to prevent high cardinality of metrics
  3. add util for metrics unit test

zh:

  1. 新增请求数指标:支持单独记录客户端、服务端请求数
  2. 新增 route formmatter :支持自定义 HTTP route 的取值方式,防止指标高基数问题
  3. 新增指标单测的工具方法

Which issue(s) this PR fixes:

@CoderPoet CoderPoet force-pushed the fix/http-metrics-high-cardinality branch from 4bee9b7 to a99a653 Compare November 16, 2023 15:32
@li-jin-gou
Copy link
Contributor

ci need to fix

@CoderPoet CoderPoet force-pushed the fix/http-metrics-high-cardinality branch 5 times, most recently from 89ff1b2 to bbb36a9 Compare November 16, 2023 16:20
1. add request count metric
2. add route formatter
3. add util for metrics unit test
@CoderPoet CoderPoet force-pushed the fix/http-metrics-high-cardinality branch from 36d63e4 to 777860f Compare November 16, 2023 16:29
@CoderPoet CoderPoet force-pushed the fix/http-metrics-high-cardinality branch from 777860f to edb91d4 Compare November 16, 2023 16:30
@GuangmingLuo
Copy link
Contributor

新增的go文件加一下 license header

@CoderPoet
Copy link
Collaborator Author

新增的go文件加一下 license header

忘记了,补上了哈

@CoderPoet
Copy link
Collaborator Author

ci need to fix

done

@CoderPoet CoderPoet merged commit 8671b6c into hertz-contrib:main Nov 17, 2023
10 checks passed
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.

4 participants