[Spark] Instrument SparkSubmit to capture errors outside of SparkListener interface#5505
Merged
paul-laffon-dd merged 2 commits intomasterfrom Jul 3, 2023
Merged
Conversation
5e6f0f4 to
1b86749
Compare
BenchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases. |
Comment on lines
+192
to
+197
| span { | ||
| operationName "spark.application" | ||
| resourceName "spark.application" | ||
| spanType "spark" | ||
| errored true | ||
| parent() |
Contributor
There was a problem hiding this comment.
Should you test span tags like error message and type?
Contributor
Author
There was a problem hiding this comment.
Yes, those can be tested to validate we are catching the right exception. The small caveat is if spark changes this error type / message in future versions, but this should be minor
PerfectSlayer
approved these changes
Jul 3, 2023
Contributor
PerfectSlayer
left a comment
There was a problem hiding this comment.
LGTM. Don't forget to squash before merging 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Instrument the
SparkSubmit.runMain(...)function to capture all errors occurring in a spark applicationThis SparkSubmit class is used by spark to launch the application in non YARN/Mesos environnements. The YARN case is already covered by instrumenting the
ApplicationMaster.finish()function (from this PR #5267)Motivation
We are currently using the interface
SparkListenerto receive events from spark. However, this interface is only capturing errors that occur during the spark computations, but not in arbitrary user code