Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原来的exporter存在两个问题:
官方dashboard实际上也是请求的sdk里面的api地址,通过浏览器计算在前端展示。
但是由于
Domain95BandwidthV2这个接口需要range>600s,所以可设置rangeTime=1200,delayTime=600,能够取到比较精确的值例如,状态码499、回源状态码418这些实际上是有相当的比例的,但是没有计算。
改为使用反射,从sdk定义的
HttpCodeV2Detail结构体取属性进行计算,并在最后过滤掉数值为0的状态码减少干扰。使用反射可能会带来一定的性能开销,但是完全可以接受