All Projects → getsentry → sentry-spark

getsentry / sentry-spark

Licence: MIT License
Apache Spark Sentry Integration

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to sentry-spark

Raven.cr
Raven is a Crystal client for Sentry
Stars: ✭ 96 (+585.71%)
Mutual labels:  crash-reporting, error-monitoring, sentry
app
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.
Stars: ✭ 259 (+1750%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Telegram
Plugin for Sentry which allows sending notification via Telegram messenger.
Stars: ✭ 168 (+1100%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Go
Official Sentry SDK for Go
Stars: ✭ 415 (+2864.29%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+6521.43%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+42842.86%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+2542.86%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+212042.86%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+11264.29%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+14950%)
Mutual labels:  crash-reporting, error-monitoring
Raven Csharp
Superseded by: https://github.com/getsentry/sentry-dotnet
Stars: ✭ 231 (+1550%)
Mutual labels:  crash-reporting, error-monitoring
backtrace-unity
First-class error reporting for the Unity game engine.
Stars: ✭ 99 (+607.14%)
Mutual labels:  crash-reporting, error-monitoring
Bugsnag Cocoa
Bugsnag crash reporting for iOS, macOS and tvOS apps
Stars: ✭ 167 (+1092.86%)
Mutual labels:  crash-reporting, error-monitoring
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (+264.29%)
Mutual labels:  crash-reporting, error-monitoring
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (+1007.14%)
Mutual labels:  crash-reporting, error-monitoring
Raven Weapp
Sentry SDK for WeApp
Stars: ✭ 142 (+914.29%)
Mutual labels:  crash-reporting, sentry
airbrake-django
A Django project for Airbrake
Stars: ✭ 29 (+107.14%)
Mutual labels:  crash-reporting, error-monitoring
elmah.io
ELMAH error logger for sending errors to elmah.io.
Stars: ✭ 31 (+121.43%)
Mutual labels:  crash-reporting, error-monitoring
raygun4android
Android crash reporting provider for Raygun
Stars: ✭ 19 (+35.71%)
Mutual labels:  crash-reporting, error-monitoring
sentry-android-gradle-plugin
Gradle plugin for Sentry Android. Upload proguard, debug files, and more.
Stars: ✭ 67 (+378.57%)
Mutual labels:  crash-reporting, sentry

Sentry for Apache Spark

Use the Sentry Integration for Scala Spark to track your error and crashes in your Spark application.

This integration is in alpha and has an unstable API.

Supports Spark 2.x.x and above.

Interested in PySpark? Check out our PySpark integration.

Installation

Add the package as a library dependecy. For the current most update to date version, please see the changelog.

libraryDependencies += "io.sentry" %% "sentry-spark" % "0.0.1-alpha04"

Make sure to configure the Sentry SDK.

We recommend using a sentry.properties file and place it in <SPARK_HOME>/conf, or anywhere in the Spark Driver's classpath.

When using cluster mode, we recommend the --files spark-submit option.

In order to use the integration, you will need to make the jar accesible to your Spark Driver.

SCALA_VERSION="2.11" # or "2.12"
./bin/spark-submit \
    --jars "sentry-spark_$SCALA_VERSION-0.0.1-alpha05.jar" \
    --files "sentry.properties" \
    example-spark-job.jar

Usage

Basic Usage

The sentry-spark integration will automatically add tags and other metadata to your Sentry events. You can set it up like this:

import io.sentry.Sentry
import io.sentry.spark.SentrySpark;

...

Sentry.init();

val spark = SparkSession
    .builder
    .appName("Simple Application")
    .getOrCreate();

SentrySpark.applyContext(spark);

SentrySpark.applyContext can take a SparkSession, SparkContext or StreamingContext.

Listeners

The sentry-spark integration exposes custom listeners that allow you to report events and errors to Sentry.

Supply the listeners as configuration properties so that they get instantiated as soon as possible.

SentrySparkListener [Spark Core]

The SentrySparkListener hooks onto the spark scheduler and adds breadcrumbs, tags and reports errors accordingly.

// Using SparkSession
val spark = SparkSession
    .builder
    .appName("Simple Application")
    .config("spark.extraListeners", "io.sentry.spark.listener.SentrySparkListener")
    .getOrCreate()

// Using SparkContext
val conf = new SparkConf()
    .setAppName("Simple Application")
    .setMaster("local[2]")
    .config("spark.extraListeners", "io.sentry.spark.listener.SentrySparkListener")
val sc  = new SparkContext(conf)

SentryQueryExecutionListener [Spark SQL]

The SentryQueryExecutionListener listens for query events and reports failures as Sentry errors.

The configuration option spark.sql.queryExecutionListeners is only supported for Spark 2.3 and above.

val spark = SparkSession
    .builder
    .appName("Simple Spark SQL application")
    .config("spark.sql.queryExecutionListeners", "io.sentry.spark.listener.SentryQueryExecutionListener")
    .getOrCreate()

SentryStreamingQueryListener [Spark SQL]

The SentryStreamingQueryListener listens for streaming queries and reports failures as Sentry errors.

val spark = SparkSession
    .builder
    .appName("Simple SQL Streaming Application")
    .config("spark.sql.streaming.streamingQueryListeners", "io.sentry.spark.listener.SentryStreamingQueryListener")
    .getOrCreate();

SentryStreamingListener [Spark Streaming]

The SentryStreamingListener listens for ongoing streaming computations and adds breadcrumbs, tags and reports errors accordingly.

import io.sentry.spark.listener.SentryStreamingListener;

val conf = new SparkConf().setMaster("local[2]").setAppName("NetworkWordCount")
val ssc = new StreamingContext(conf, Seconds(1))

ssc.addStreamingListener(new SentryStreamingListener);

Development

Package the assets with

sbt package

To run tests

sbt test

Test local publishing using

sbt +publishLocal

Publishing

To publish to bintray, first update your bintray credentials using your bintray username and API key (found on the settings page)

sbt bintrayChangeCredentials

Double check your configuration with:

sbt bintrayWhoami

For more info see sbt-bintray

By default, the sbt-pgp library will use gpg's default key to sign the files, but this can be changed, just read through the sbt-pgp docs.

To sign and publish the library:

sbt +publishSigned

You can then upload to maven through the bintray interface by entering in the proper credentials.

Contributing

As this integration is under active work, reach out to us on our Discord if you are looking to get involved.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].