Remove MIZU_GLOBAL_GOLANG_PATH environment variable

This commit is contained in:
M. Mert Yildiran 2022-06-08 04:29:55 +03:00
parent 2293e4346f
commit b0340db8bc
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
2 changed files with 0 additions and 27 deletions

View File

@ -293,15 +293,6 @@ func startTlsTapper(extension *api.Extension, outputItems chan *api.OutputChanne
}
}
// A quick way to instrument Go `crypto/tls` using executable path - used for debuging and troubleshooting
//
if os.Getenv("MIZU_GLOBAL_GOLANG_PATH") != "" {
if err := tls.GlobalGolangTapPath(os.Getenv("MIZU_GLOBAL_GOLANG_PATH")); err != nil {
tlstapper.LogError(err)
return nil
}
}
var emitter api.Emitter = &api.Emitting{
AppStats: &diagnose.AppStats,
OutputChannel: outputItems,

View File

@ -79,10 +79,6 @@ func (t *TlsTapper) GlobalGolangTap(procfs string, pid string) error {
return t.tapGolangPid(procfs, uint32(_pid), api.UNKNOWN_NAMESPACE)
}
func (t *TlsTapper) GlobalGolangTapPath(exePath string) error {
return t.tapGolangPath(exePath)
}
func (t *TlsTapper) AddSsllibPid(procfs string, pid uint32, namespace string) error {
sslLibrary, err := findSsllib(procfs, pid)
@ -217,20 +213,6 @@ func (t *TlsTapper) tapGolangPid(procfs string, pid uint32, namespace string) er
return nil
}
func (t *TlsTapper) tapGolangPath(exePath string) error {
hooks := golangHooks{}
if err := hooks.installUprobes(&t.bpfObjects, exePath); err != nil {
return err
}
logger.Log.Infof("Tapping TLS (Golang: %v)", exePath)
t.golangHooksStructs = append(t.golangHooksStructs, hooks)
return nil
}
func LogError(err error) {
var e *errors.Error
if errors.As(err, &e) {