Skip to content

Commit

Permalink
chore: add additional debug in getSparkContextUiPathForCluster()
Browse files Browse the repository at this point in the history
  • Loading branch information
sdewitt-newrelic committed Oct 4, 2024
1 parent 80bf205 commit 95e4681
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/databricks/spark.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (d *DatabricksSparkReceiver) PollMetrics(
ctx context.Context,
writer chan <- model.Metric,
) error {
log.Debugf("polling for Spark metrics")

log.Debugf("listing all clusters")
all, err := d.w.Clusters.ListAll(
ctx,
databricksSdkCompute.ListClustersRequest{},
Expand Down Expand Up @@ -168,6 +171,7 @@ func getSparkContextUiPathForCluster(

clusterId := c.ClusterId

log.Debugf("creating execution context for cluster %s", clusterId)
waitContextStatus, err := w.CommandExecution.Create(
ctx,
databricksSdkCompute.CreateContext{
Expand All @@ -194,6 +198,10 @@ func getSparkContextUiPathForCluster(
Language: databricksSdkCompute.LanguagePython,
}

log.Debugf(
"executing context UI discovery script for cluster %s",
clusterId,
)
waitCommandStatus, err := w.CommandExecution.Execute(
ctx,
cmd,
Expand Down

0 comments on commit 95e4681

Please sign in to comment.