Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New @inngest/middleware-sentry package #598

Merged
merged 18 commits into from
Jul 4, 2024
Merged

New @inngest/middleware-sentry package #598

merged 18 commits into from
Jul 4, 2024

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams commented Jun 6, 2024

Summary

A new @inngest/middleware-sentry package, intended to replace the current example, supporting exception capturing and basic traces.

Usage

Important

While testing, use the build from this PR at @inngest/middleware-sentry@pr-598.

npm install @inngest/middleware-sentry@pr-598
import * as Sentry from "@sentry/node";
import { Inngest } from "inngest";
import { sentryMiddleware } from "@inngest/middleware-sentry";

// Initialize Sentry as usual wherever is appropriate
Sentry.init(...);

const inngest = new Inngest({
  id: "my-app",
  middleware: [sentryMiddleware()],
});

Options

sentryMiddleware({
  ...
});

disableAutomaticFlush?: boolean

If true, the Sentry middleware will not automatically flush events after
each function run. This can be useful if you want to control when events
are sent to Sentry, or leave it to Sentry's default behavior.

By default, automatic flushing is enabled to ensure that events are sent in
serverless environments where the runtime may be terminated if the function
has returned a value.

Defaults to false.

Checklist

  • Add a README.md
  • Add a LICENSE.md
  • Added a docs PR that references this PR
  • Added unit/integration tests
  • Added changesets if applicable

Related

@jpwilliams jpwilliams added the ✨ new New features, integrations, or exports label Jun 6, 2024
@jpwilliams jpwilliams self-assigned this Jun 6, 2024
Copy link

changeset-bot bot commented Jun 6, 2024

🦋 Changeset detected

Latest commit: aaa6e5f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@inngest/middleware-sentry Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jpwilliams jpwilliams added the prerelease/middleware-sentry Create snapshot releases for a PR for the "@inngest/middleware-sentry" package. label Jun 6, 2024
@inngest-release-bot
Copy link
Collaborator

inngest-release-bot commented Jun 6, 2024

A user has added the prerelease/middleware-sentry label, so this PR will be published to npm with the tag pr-598. It will be updated with the latest changes as you push commits to this PR.

You can install this prerelease version with:

npm install @inngest/middleware-sentry@pr-598

The last release was built and published from aaa6e5f.

@brijmcq
Copy link

brijmcq commented Jun 7, 2024

@jpwilliams your middleware works on my end.

@jpwilliams jpwilliams merged commit cb4fdfd into main Jul 4, 2024
39 of 40 checks passed
@jpwilliams jpwilliams deleted the middleware-sentry branch July 4, 2024 17:39
jpwilliams pushed a commit that referenced this pull request Jul 4, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @inngest/[email protected]

### Minor Changes

- [#598](#598)
[`cb4fdfd`](cb4fdfd)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Initial release!

## [email protected]

### Patch Changes

- [#622](#622)
[`c041d6f`](c041d6f)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix rare
theoretical checkpoint hang

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 @inngest/middleware-sentry ✨ new New features, integrations, or exports prerelease/middleware-sentry Create snapshot releases for a PR for the "@inngest/middleware-sentry" package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants