MCPcopy
hub / github.com/keploy/keploy / probeProxy

Function probeProxy

pkg/agent/proxy/proxy.go:69–80  ·  view source on GitHub ↗

probeProxy emits a [PROBE/proxy] log tagged with a stable conn id and phase name. Cheap to call when the probe is off (single atomic load + early return); zero allocations on the hot disabled path.

(logger *zap.Logger, phase string, connID int64, fields ...zap.Field)

Source from the content-addressed store, hash-verified

67// and phase name. Cheap to call when the probe is off (single atomic
68// load + early return); zero allocations on the hot disabled path.
69func probeProxy(logger *zap.Logger, phase string, connID int64, fields ...zap.Field) {
70 if !probeOn() {
71 return
72 }
73 base := []zap.Field{
74 zap.String("probe", "proxy"),
75 zap.String("phase", phase),
76 zap.Int64("connID", connID),
77 zap.Int64("ts_ns", time.Now().UnixNano()),
78 }
79 logger.Info("[PROBE/proxy]", append(base, fields...)...)
80}
81
82var defaultMysqlPorts = []uint32{3306, 4000}
83

Callers 1

handleConnectionMethod · 0.85

Calls 2

probeOnFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected