sentinel-golang
sentinel-golang copied to clipboard
Support blocked log recording
Describe what this PR does / why we need it
Support blocked log recording
log example :
2020-10-20 22:52:10|some-test22|FlowControl|2000
time|resource name|block type|block times
Does this pull request fix one issue?
fixed #130
Describe how you did it
This is a StatLogger implementation like https://github.com/alibaba/Sentinel/tree/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/eagleeye
Describe how to verify it
Run stat_logger_test.go. Run qps_limit_example.go and check log file.
Special notes for reviews
Codecov Report
Merging #297 into master will decrease coverage by
0.01%
. The diff coverage is51.07%
.
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
- Coverage 51.44% 51.42% -0.02%
==========================================
Files 80 83 +3
Lines 4010 4196 +186
==========================================
+ Hits 2063 2158 +95
- Misses 1661 1745 +84
- Partials 286 293 +7
Impacted Files | Coverage Δ | |
---|---|---|
core/statlogger/stat_writer.go | 12.64% <12.64%> (ø) |
|
core/statlogger/stat_log_controller.go | 80.00% <80.00%> (ø) |
|
core/statlogger/stat_logger.go | 88.13% <88.13%> (ø) |
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 a9496ed...f44ff55. Read the comment docs.