trafficcontrol
trafficcontrol copied to clipboard
Get Varnish stats with VMOD dyncounters
Get Varnish stats by using VMOD dyncounters to create custom stats and fetching them from vstats.
Closes: #7782
Which Traffic Control components are affected by this PR?
- Traffic Monitor
- CDN in a Box
What is the best way to verify this PR?
- Run CIAB with Varnish
- Query some valid endpoints for 2xx like:
docker-compose exec enroller curl -L "http://video.demo1.mycdn.ciab.test"
- Query invalid endpoints for 4xx like:
docker-compose exec enroller curl -L "http://video.demo1.mycdn.ciab.test/any"
- Either query Traffic Monitor endpoint
/publish/DsStats?stats=status_4xx,status_2xx
to see the counters increasing or navigate to Traffic Portal UI for similar results.
PR submission checklist
- [x] This PR has tests
- [x] This PR has documentation
- [ ] This PR has a CHANGELOG.md entry
- [x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)
Codecov Report
Merging #7805 (8d22863) into master (a2720ee) will decrease coverage by
2.90%
. Report is 19 commits behind head on master. The diff coverage is69.84%
.
@@ Coverage Diff @@
## master #7805 +/- ##
============================================
- Coverage 31.77% 28.87% -2.90%
Complexity 98 98
============================================
Files 717 601 -116
Lines 82538 77237 -5301
Branches 965 90 -875
============================================
- Hits 26224 22303 -3921
+ Misses 54155 52843 -1312
+ Partials 2159 2091 -68
Flag | Coverage Δ | |
---|---|---|
golib_unit | 53.54% <0.00%> (-0.02%) |
:arrow_down: |
grove_unit | 12.02% <ø> (ø) |
|
t3c_unit | 5.91% <ø> (ø) |
|
traffic_monitor_unit | 26.93% <77.19%> (+0.48%) |
:arrow_up: |
traffic_ops_unit | 21.50% <ø> (+0.04%) |
:arrow_up: |
traffic_portal_v2 | ? |
|
traffic_stats_unit | 10.78% <ø> (ø) |
|
unit_tests | 25.69% <69.84%> (-3.39%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
lib/varnishcfg/vclbuilder.go | 7.84% <0.00%> (-0.33%) |
:arrow_down: |
lib/varnishcfg/stats.go | 0.00% <0.00%> (ø) |
|
traffic_monitor/cache/vstats.go | 70.11% <77.19%> (+18.50%) |
:arrow_up: |
... and 120 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more