Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discuss] about genrating evt of packetloss #299

Open
dzy176 opened this issue Jun 9, 2024 · 1 comment
Open

[discuss] about genrating evt of packetloss #299

dzy176 opened this issue Jun 9, 2024 · 1 comment

Comments

@dzy176
Copy link
Contributor

dzy176 commented Jun 9, 2024

Hi, I see in packetloss, if sth is wrong in GetSymsByStack() , the evt won't be sent to the sink because we continue to skip the next steps :

	stacks, err := bpfutil.GetSymsByStack(uint32(event.StackId), p.objs.InspPlStack)
	if err != nil {
		log.Warnf("%s failed get sym by stack, err: %v", probeName, err)
		continue
	}

It means we finaly miss record this event. Actually in my production env, I do encounter this problem, I get some packetloss metric but no event.
So how about not continue,

	stacks, err := bpfutil.GetSymsByStack(uint32(event.StackId), p.objs.InspPlStack)
	if err != nil {
		log.Warnf("%s failed get sym by stack, err: %v", probeName, err)
		// continue
                evt.Message = "unknown"
	} else {
	  var strs []string
	  for _, sym := range stacks {
		  if _, ok := ignoreSymbolList[sym.GetName()]; ok {
			  goto anotherLoop
		  }
		  strs = append(strs, sym.GetExpr())
	  }
	  evt.Message = strings.Join(strs, "\n") 
        }
@jzwlqx
Copy link
Collaborator

jzwlqx commented Jul 11, 2024

Stop on failing getting kernel symbol to avoid too many meaningless drop event (drop event on tcp closing e.g.).

I understand user do need the event regardless of whether symbol was resolved. Should we add a config for packetloss probe to specify the behaviour when cannot resolve symbol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants