8.0.0-alpha.4 • Published 3 days ago

@sentry/google-cloud-serverless v8.0.0-alpha.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

Official Sentry SDK for Google Cloud Functions

Links

General

This package is a wrapper around @sentry/node, with added functionality related to various Serverless solutions. All methods available in @sentry/node can be imported from @sentry/google-cloud-serverless.

To use this SDK, call Sentry.init(options) at the very beginning of your JavaScript file.

const Sentry = require('@sentry/google-cloud-serverless');

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  // ...
});

// For HTTP Functions:

exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
  throw new Error('oh, hello there!');
});

// For Background Functions:

exports.helloEvents = Sentry.wrapEventFunction((data, context, callback) => {
  throw new Error('oh, hello there!');
});

// For CloudEvents:

exports.helloEvents = Sentry.wrapCloudEventFunction((context, callback) => {
  throw new Error('oh, hello there!');
});
8.0.0-beta.5

3 days ago

8.0.0-beta.4

9 days ago

8.0.0-beta.3

14 days ago

8.0.0-beta.2

16 days ago

8.0.0-beta.1

17 days ago

8.0.0-alpha.9

25 days ago

8.0.0-alpha.8

25 days ago

8.0.0-alpha.7

1 month ago

8.0.0-alpha.5

1 month ago

8.0.0-alpha.4

2 months ago