Skip to content

Conversation

@pvital
Copy link
Member

@pvital pvital commented Oct 17, 2023

In multithreaded applications (services), only the first or master process is announced to the Agent when the service starts, but if a not announced forked process handles the (HTTP) ENTRY requests and it contains one or more EXIT spans created during the first request, those EXIT spans are missed and not reported.

This PR has a fix that returns True when the agent.host.can_send() method is called and detects the state machine is in wait4init or good2go states, which happens after the current process is announced to the Agent.

@pvital pvital self-assigned this Oct 17, 2023
@pvital pvital requested review from Ferenc- and GSVarsha October 17, 2023 20:04
@pvital pvital marked this pull request as draft October 18, 2023 13:28
@pvital pvital added the WIP work in progress label Oct 23, 2023
@pvital pvital force-pushed the fork_missing_spans_fix branch from ec04f7b to c9267bf Compare October 31, 2023 17:06
@pvital pvital removed the WIP work in progress label Oct 31, 2023
@pvital pvital marked this pull request as ready for review October 31, 2023 19:49
@pvital pvital requested a review from Ferenc- October 31, 2023 19:49
@pvital pvital force-pushed the fork_missing_spans_fix branch from c9267bf to 2206e28 Compare November 8, 2023 09:59
In multithreaded applications (services), only the first or master
process is announced to the Agent when the service starts, but if a
not announced forked process handles the (HTTP) ENTRY requests and it
contains one or more EXIT spans created during the first request,
those EXIT spans are missed and not reported.

This fix returns True when agent.host.can_send() method is called and
detects that the current process is a fork and has finished the
announcement process to the Agent with a valid FSM state.

Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
@pvital pvital force-pushed the fork_missing_spans_fix branch from 2206e28 to 3fa555c Compare November 8, 2023 14:30
Copy link
Member

@Ferenc- Ferenc- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for now. Let's wait with a new release until we have tracer test suite feedback.

@pvital pvital merged commit dd11c13 into master Nov 8, 2023
@pvital pvital deleted the fork_missing_spans_fix branch November 8, 2023 14:46
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

Successfully merging this pull request may close these issues.

3 participants