You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dd-java-agent/instrumentation/spark/spark-common/src/main/java/datadog/trace/instrumentation/spark/AbstractDatadogSparkListener.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -644,9 +644,7 @@ public synchronized void onJobEnd(SparkListenerJobEnd jobEnd) {
644
644
}
645
645
} else {
646
646
lastJobFailed = false;
647
-
// Note: we intentionally do NOT reset lastSqlFailed here. A successful Spark job
648
-
// should not erase a prior SQL failure (e.g. from cleanup operations after a failed
649
-
// spark.sql() call). The SQL failure is only relevant at finishApplication time.
Copy file name to clipboardExpand all lines: dd-java-agent/instrumentation/spark/spark-common/src/main/java/datadog/trace/instrumentation/spark/AbstractSparkInstrumentation.java
+28-50Lines changed: 28 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,8 @@ public String[] knownMatchingTypes() {
40
40
"org.apache.spark.util.SparkClassUtils",
41
41
"org.apache.spark.scheduler.LiveListenerBus",
42
42
"org.apache.spark.sql.execution.SparkPlanInfo$",
43
-
"org.apache.spark.sql.SparkSession"
43
+
"org.apache.spark.sql.SparkSession",
44
+
"org.apache.spark.sql.execution.QueryExecution"
44
45
};
45
46
}
46
47
@@ -77,6 +78,14 @@ public void methodAdvice(MethodTransformer transformer) {
Copy file name to clipboardExpand all lines: dd-java-agent/instrumentation/spark/spark-common/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSparkTest.groovy
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -223,6 +223,38 @@ abstract class AbstractSparkTest extends InstrumentationSpecification {
223
223
}
224
224
}
225
225
226
+
def"DataFrame analysis failure on unresolved column marks application span as error"() {
227
+
setup:
228
+
def sparkSession =SparkSession.builder()
229
+
.config("spark.master", "local[2]")
230
+
.getOrCreate()
231
+
232
+
try {
233
+
// Triggers AnalysisException via Dataset.select() -> QueryExecution.assertAnalyzed(),
234
+
// NOT through SparkSession.sql(). This exercises the QueryExecutionFailureAdvice.
0 commit comments