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

Fork missing spans fix #460

Merged
merged 2 commits into from
Nov 8, 2023
Merged

Fork missing spans fix #460

merged 2 commits into from
Nov 8, 2023

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
instana/instrumentation/pep0249.py Outdated Show resolved Hide resolved
instana/agent/host.py Outdated Show resolved Hide resolved
@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 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
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>
Copy link
Collaborator

@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
12 checks passed
@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.

2 participants