Cette page n'est pas encore disponible en français. Nous travaillons sur sa traduction.
Si vous avez des questions ou des commentaires concernant notre projet de traduction actuel, n'hésitez pas à nous contacter !

Overview

OpenTelemetry Apache Spark metrics in a Spark dashboard

The Apache Spark receiver collects Apache Spark metrics that populate the Spark Overview dashboard.

For more information, see the OpenTelemetry project documentation for the Apache Spark receiver.

Setup

This example uses component identifiers from OpenTelemetry Collector Contrib v0.154.0. For other versions or distributions, use the identifiers your distribution supports. Earlier versions name this receiver apachespark.

The Apache Spark receiver reads the REST API that a running Spark application serves on its web UI port.

Add the following lines to your Collector configuration, and set endpoint to the address of your Spark application’s web UI:

receivers:
  apache_spark:
    endpoint: http://localhost:4040

Add apache_spark to the receivers list of the metrics pipeline in your configuration. Keep the processors already in that pipeline. The Datadog OTLP metrics intake accepts only delta metrics, and this receiver produces cumulative sums, so the pipeline needs cumulativetodelta. The recommended Collector setup includes it.

For all configuration options, see the Apache Spark receiver documentation.

Data collected

OTELDESCRIPTIONFILTER
spark.driver.block_manager.disk.usageDisk space used by the BlockManager.
spark.driver.block_manager.memory.usageMemory usage for the driver’s BlockManager.
spark.driver.dag_scheduler.stage.countNumber of stages the DAGScheduler is either running or needs to run.
spark.executor.disk.usageDisk space used by this executor for RDD storage.
spark.executor.memory.usageStorage memory used by this executor.
spark.job.stage.activeNumber of active stages in this job.
spark.job.stage.resultNumber of stages with a specific result in this job.job_result: failed
spark.job.stage.resultNumber of stages with a specific result in this job.job_result: skipped
spark.job.stage.resultNumber of stages with a specific result in this job.job_result: completed
spark.job.task.activeNumber of active tasks in this job.
spark.job.task.resultNumber of tasks with a specific result in this job.job_result: completed
spark.job.task.resultNumber of tasks with a specific result in this job.job_result: failed
spark.job.task.resultNumber of tasks with a specific result in this job.job_result: skipped
spark.stage.io.recordsNumber of records written and read in this stage.direction: in
spark.stage.io.recordsNumber of records written and read in this stage.direction: out
spark.stage.io.sizeAmount of data written and read at this stage.direction: in
spark.stage.io.sizeAmount of data written and read at this stage.direction: out
spark.stage.shuffle.io.read.sizeAmount of data read in shuffle operations in this stage.
spark.stage.shuffle.io.recordsNumber of records written or read in shuffle operations in this stage.direction: in
spark.stage.shuffle.io.recordsNumber of records written or read in shuffle operations in this stage.direction: out

For the full mapping between OpenTelemetry and Datadog metric names, see OpenTelemetry Metrics Mapping.

Further reading

Documentation, liens et articles supplémentaires utiles: