Skip to content

Send error.transaction_id and error.parent_id only if there is trace_id#1537

Merged
eyalkoren merged 2 commits intoelastic:masterfrom
eyalkoren:error-trace-id
Nov 25, 2020
Merged

Send error.transaction_id and error.parent_id only if there is trace_id#1537
eyalkoren merged 2 commits intoelastic:masterfrom
eyalkoren:error-trace-id

Conversation

@eyalkoren
Copy link
Contributor

@eyalkoren eyalkoren commented Nov 25, 2020

What does this PR do?

Context - reported in the forum.
APM Server will reject Error events that contain parent_id and/or transaction_id but do not contain trace_id. This PR ensures that this restriction is enforced.
In addition, it provides logs to analyze the reason for getting error captures that are not adhering this.

Checklist

  • This is a bugfix
Copy link
Member

@felixbarny felixbarny left a comment

Choose a reason for hiding this comment

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

Do you have a suspicion why there can be a trace context with a non-empty transaction id but an empty trace id? The only things that come to my mind are race conditions or visibility issues.

@eyalkoren
Copy link
Contributor Author

Do you have a suspicion why there can be a trace context with a non-empty transaction id but an empty trace id? The only things that come to my mind are race conditions or visibility issues.

No clue 🙁 . This is why I added the logs and asked the reporting user to trigger it.
Sadly, the only thing that came to my mind was concurrency-related as well, but I am hoping it would be something easier to pinpoint. It may be related to the non-fully-dereferenced transactions somehow 🤷‍♂️

@ghost
Copy link

ghost commented Nov 25, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #1537 opened]

  • Start Time: 2020-11-25T10:00:47.704+0000

  • Duration: 46 min 37 sec

Test stats 🧪

Test Results
Failed 0
Passed 1617
Skipped 12
Total 1629

@eyalkoren eyalkoren merged commit 642e13c into elastic:master Nov 25, 2020
@eyalkoren eyalkoren deleted the error-trace-id branch November 25, 2020 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants