Conversation
|
%( ?!? |
99d3bfb to
c540882
Compare
|
I have now officially spent more time trying to get this garbage test to run that I did on the actual plugin 😠 EDIT: Never mind, the garbage test fails because there is an actual bug with the plugin... |
|
Ok, that bug in the plugin is not so much of a bug but a design issue. It is caused by MongoDB calling back into itself for internal operation using the same user-level API that starts an exit span. This causes a new exit span but inherits from the old and screws up some internal counts. I can easily fix it for this case, but the more general question is as follows: The original behavior in this agent was (and still) is that if an Entry / Exit span gets created on top of another of the same kind then that span is inherited instead of a new span being created as a child. This is great for something like So what is the desired behavior here? Should I exclude user processing (like the callback or |
|
Ok, finally, good to merge... |
For such kind of operations (user local processing, callback or
For this particular case, I'm 👍 to your solution in this PR |
The thing is we do not know ahead of time what the user will do in the callback, so do we always pre-emptively create a local span on all Exit spans which call user code? This is essentially duplicating the Exit span everywhere and most of those Local spans will be unnecessary. |
I don't think we have to. The reason other agents did this, is for propagating context. Their tracing context have to be injected in the |
That doesn't solve the original problem I described. |
I am answering the question about the exit + local(callback) + exit. |
Ok, so by that I understand that if inside an open HTTP Exit span the user code queries a database which needs its own Exit span then that span will be a CHILD of the HTTP Exit span, and the current architecture has no problem with Exit spans as children of other Exit spans. |
Yes, correct. The OAP would consider all exit spans accurate. If things like |
still needs test