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

Fix race condition with extra metadata + partial transaction extra span #1914

Merged
merged 10 commits into from
Oct 5, 2023

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Oct 4, 2023

What does this pull request do?

Eliminates the add_metadata interaction with the transport thread. We now generate our own metadata for sending the partial transaction, and also save the extra metadata in the Client object so that it makes it into every future metadata build.

Also, fixed the extra span being recorded when we send the partial transaction. Fixes #1902

@basepi basepi requested a review from trentm October 4, 2023 23:15
@basepi basepi changed the title Fix race condition with extra metadata Fix race condition with extra metadata + partial transaction extra span Oct 4, 2023
trentm
trentm previously approved these changes Oct 4, 2023
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

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

I'll trust you on the .pause_sampling. I don't know the Python agent code well enough to grok that.

elasticapm/contrib/serverless/aws.py Show resolved Hide resolved
Copy link

@lahsivjar lahsivjar left a comment

Choose a reason for hiding this comment

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

Tested with the branch and didn't see any errors.

@basepi basepi enabled auto-merge (squash) October 5, 2023 20:55
@basepi basepi merged commit 7af9da9 into elastic:main Oct 5, 2023
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Lambda] Agent is reporting a span for partial transaction reporting in lambda
3 participants