Skip to content

Add support for Cloudflare Workflows #16458

Closed

Description

@AbhiPrasad

We've got some requests for supporting Cloudflare Workflows, so tracking this here.

https://developers.cloudflare.com/workflows/

Please upvote this issue and leave a comment if you want to see support for this functionality. Thanks!

Activity

  1. andycrum commented on Jun 2, 2025

    @andycrum

    Would love to see support for this! Workflows are an important part of our infrastructure and surfacing exceptions from them is really important.

  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 2, 2025
  3. torybriggs commented on Jun 2, 2025

    @torybriggs

    Yes! Would love to see Workflows supported.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 3, 2025
  5. AbhiPrasad commented on Jun 5, 2025

    @AbhiPrasad
    ContributorAuthor

    Alright thanks for the comments and reacts everyone! We're going to start working on this :)

  6. amiranvarov commented on Jun 6, 2025

    @amiranvarov

    We need this FEATURE! Please set a high priority for this one!

  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 6, 2025
  8. Mael-Abgrall commented on Jun 6, 2025

    @Mael-Abgrall

    just my two cents for anyone who needs it NOW

    you can still use Sentry using the browser version, you just have to call it at the beginning of your cron or workflow.

    this is my implementation, a bit wordy but it works perfectly:

    import * as SentryBrowser from '@sentry/browser';
    import * as Sentry from '@sentry/cloudflare';
    
    /**
     * Init reporting clients
     * @param root named parameters
     * @param root.sentryDSN the DSN for Sentry (if not in the http worker)
     */
    export function initReportingClients({
      sentryDSN,
    }: {
      sentryDSN: string | undefined;
    }): void {
      // ...
    
      if (sentryDSN) {
        SentryBrowser.init({
          attachStacktrace: true,
          dsn: sentryDSN,
          integrations: [
            SentryBrowser.captureConsoleIntegration(),
            SentryBrowser.extraErrorDataIntegration({
              captureErrorCause: true,
              depth: 10,
            }),
          ],
          // @ts-expect-error This is defined by the bundler
          // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- This is defined by the bundler
          release: GITHUB_SHA,
          sendDefaultPii: true,
          tracesSampleRate: 1,
        });
      }
    }
    
    /**
     * Capture an exception
     * @param root named parameters
     * @param root.error the error to capture
     * @param root.userID the user ID
     * @param root.additionalData additional data to send to the error tracking services
     */
    export function captureException({
      additionalData,
      error,
      userID,
    }: {
      additionalData?: { [key: string]: unknown };
      error: unknown;
      userID: string | undefined;
    }): void {
      if (Sentry.isEnabled()) {
        Sentry.captureException(error, {
          extra: additionalData,
          user: userID
            ? {
                id: userID,
              }
            : undefined,
        });
      } else if (SentryBrowser.isEnabled()) {
        SentryBrowser.captureException(error, {
          extra: additionalData,
          user: userID
            ? {
                id: userID,
              }
            : undefined,
        });
      } else {
        logger.error('No error tracking service enabled!');
      }
    }
  9. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 9, 2025
  10. added a commit that references this issue on Jun 23, 2025
    6858602
  11. AbhiPrasad commented on Jun 23, 2025

    @AbhiPrasad
    ContributorAuthor

    This will go out with the next release!

  12. amiranvarov commented on Jun 23, 2025

    @amiranvarov

    Great! Any ETA on when the next release is expected?

  13. AbhiPrasad commented on Jun 23, 2025

    @AbhiPrasad
    ContributorAuthor

    Wednesday afternoon at the latest

  14. github-actions commented on Jun 25, 2025

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #16672, which was included in the 9.32.0 release.

  15. AbhiPrasad commented on Jun 26, 2025

    @AbhiPrasad
    ContributorAuthor
  16. AbhiPrasad commented on Jun 26, 2025

    @AbhiPrasad
    ContributorAuthor

    and here's what it looks like:

    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions