diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ae54649bf..c746cb5f4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -81,7 +81,7 @@ jobs: uses: actions/cache@v3 with: path: ~/go/bin/staticcheck - key: staticcheck-v0.4.6 + key: staticcheck-v0.5.0 if: ${{ matrix.command == 'lint' }} - name: Install linter diff --git a/godeps.txt b/godeps.txt index cfeddd38d..48c42e08f 100644 --- a/godeps.txt +++ b/godeps.txt @@ -386,6 +386,7 @@ github.com/ServiceWeaver/weaver/internal/status errors flag fmt + github.com/ServiceWeaver/weaver/internal/control github.com/ServiceWeaver/weaver/internal/files github.com/ServiceWeaver/weaver/internal/metrics github.com/ServiceWeaver/weaver/internal/traceio diff --git a/internal/status/dashboard.go b/internal/status/dashboard.go index 519b2b6da..9b2ab57a7 100644 --- a/internal/status/dashboard.go +++ b/internal/status/dashboard.go @@ -28,6 +28,7 @@ import ( "strings" "time" + "github.com/ServiceWeaver/weaver/internal/control" metrics2 "github.com/ServiceWeaver/weaver/internal/metrics" "github.com/ServiceWeaver/weaver/internal/traceio" "github.com/ServiceWeaver/weaver/runtime/logging" @@ -265,14 +266,23 @@ func computeTraffic(status *Status, metrics []*protos.MetricSnapshot) []edge { caller string component string } + isSystemComponentFn := func(name string) bool { + return name == control.WeaveletPath || name == control.DeployerPath + } byPair := map[pair]int{} for _, metric := range metrics { if metric.Name != metrics2.MethodCountsName { continue } + caller := metric.Labels["caller"] + component := metric.Labels["component"] + if isSystemComponentFn(caller) || isSystemComponentFn(component) { + // Don't display traffic information for the internal system components. + continue + } call := pair{ - caller: metric.Labels["caller"], - component: metric.Labels["component"], + caller: caller, + component: component, } byPair[call] += int(metric.Value) }