apm_fusing.go 760 B

1234567891011121314151617181920212223242526272829
  1. package containers
  2. import log "github.com/sirupsen/logrus"
  3. func (r *Registry) DoFusing() {
  4. /*//先处于熔断状态 (应用层的uprobes将停止attach)
  5. r.isFusing = true
  6. //再关闭应用层的uprobes
  7. for pid, c := range r.containersByPid {
  8. if c != nil {
  9. c.detachUprobes(pid)
  10. }
  11. }
  12. //最后关闭内核层的tracepoint、kprobe
  13. r.tracer.UnlinkEbpfProg()*/
  14. log.Infof("-----DoFusing will to execute fuse operates -----\n")
  15. }
  16. func (r *Registry) DoResume() error {
  17. /*//先开启内核层的tracepoint、kprobe
  18. if err := r.tracer.LinkEbpfProg(); err != nil {
  19. return err
  20. }
  21. //再处于非熔断状态 (应用层的uprobes将开启attach)
  22. r.isFusing = false*/
  23. log.Infof("-----DoResume will to execute resume operates -----\n")
  24. return nil
  25. }