From c36d2ef3733a0619b992f8ddc23b072474b04044 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Tue, 9 Oct 2018 15:11:46 -0700 Subject: Add new netstack metrics to the sentry PiperOrigin-RevId: 216431260 Change-Id: Ia6e5c8d506940148d10ff2884cf4440f470e5820 --- runsc/boot/loader.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'runsc/boot') diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 5716ef217..1ad6b09f4 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -683,11 +683,14 @@ func newEmptyNetworkStack(conf *Config, clock tcpip.Clock) (inet.Stack, error) { // NetworkNone sets up loopback using netstack. netProtos := []string{ipv4.ProtocolName, ipv6.ProtocolName, arp.ProtocolName} protoNames := []string{tcp.ProtocolName, udp.ProtocolName, ping.ProtocolName4} - s := &epsocket.Stack{stack.New(netProtos, protoNames, stack.Options{Clock: clock})} + s := epsocket.Stack{stack.New(netProtos, protoNames, stack.Options{ + Clock: clock, + Stats: epsocket.Metrics, + })} if err := s.Stack.SetTransportProtocolOption(tcp.ProtocolNumber, tcp.SACKEnabled(true)); err != nil { return nil, fmt.Errorf("failed to enable SACK: %v", err) } - return s, nil + return &s, nil default: panic(fmt.Sprintf("invalid network configuration: %v", conf.Network)) -- cgit v1.2.3