GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Insights: auto-Instrument BullMQ for Queue Insights · Issue #12956 · getsentry/sentry-javascript

Insights: auto-Instrument BullMQ for Queue Insights #12956

New issue
Copy link
New issue
Copy link
Closed
#21777
Closed
Insights: auto-Instrument BullMQ for Queue Insights#12956
#21777
Copy link
Assignees
JPeer264
Labels
FeatureNode.jsSpans

Description

@bcoe
bcoe
opened on Jul 17, 2024
Issue body actions

Problem Statement

Similar to Celery for Python, BullMQ seems like it would be a good choice to auto-instrument for queue insights, see: #10148, along with conversations on Twitter:

Screenshot 2024-07-17 at 10 53 00 AM Screenshot 2024-07-17 at 10 53 19 AM Screenshot 2024-07-17 at 10 53 11 AM

Solution Brainstorm

We should model an implementation after the implementation for Celery.

Reacted by Youssef Meskini, Peter Baker, Sean Wilson, Jan Koeppen, Julian Poyourow, Hayden Briese, Martin Janeček, Esh, Siarhei Lukashenka, Moritz Breit and 2 more

Activity

Next
  1. bcoe
    added
    Type: Improvement
    on Jul 17, 2024
  2. AbhiPrasad
    added
    Package: node
    Feature: Performance
    on Jul 17, 2024
  3. AbhiPrasad commented on Jul 17, 2024

    @AbhiPrasad
    AbhiPrasad
    on Jul 17, 2024
    Contributor
    More actions

    There is OTEL instrumentation we can leverage here: https://github.com/appsignal/opentelemetry-instrumentation-bullmq

  4. AbhiPrasad commented on Jul 17, 2024

    @AbhiPrasad
    AbhiPrasad
    on Jul 17, 2024
    Contributor
    More actions

    In the time being, we can probably write some docs that uses the otel instrumentation manually with bullmq. So users would have to install opentelemetry-instrumentation-bullmq themselves and then call span.setAttribute themselves.

    @bcoe for an intermediate solution what do you think?

  5. iacobus commented on Aug 22, 2024

    @iacobus
    iacobus
    on Aug 22, 2024
    More actions

    Hi! Our team is also interested in instrumenting our BullMQ workloads running inside of NestJS. I know close to nothing about OTEL or about how Sentry works, but I've been playing with the OTEL instrumentation package that you referenced, and got something, but not much.

    What I've done is basically trying to integrate the OTEL instrumentation with @sentry/node by looking at how other integrations work. The following snippet defines a BullMQ integration based off the PG tracing code:

    import { BullMQInstrumentation } from '@appsignal/opentelemetry-instrumentation-bullmq'
    import { defineIntegration } from '@sentry/core'
    import { generateInstrumentOnce } from '@sentry/node'
    import type { IntegrationFn } from '@sentry/types'
    
    const INTEGRATION_NAME = 'BullMQ'
    
    export const instrumentBullMQ = generateInstrumentOnce(
      INTEGRATION_NAME,
      () =>
        new BullMQInstrumentation({}),
    )
    
    const _bullmqIntegration = (() => {
      return {
        name: INTEGRATION_NAME,
        setupOnce() {
          instrumentBullMQ()
        },
      }
    }) satisfies IntegrationFn
    
    /**
     * BullMQ integration
     *
     * Capture tracing data for BullMQ.
     */
    export const bullmqIntegration = defineIntegration(_bullmqIntegration)

    With this snippet I can add the bullmqIntegration to my integrations array in Sentry.init (which also contains nodeProfilingIntegration()), so that when I trigger a Bull job, I see a transaction of type message under the Performance section of Sentry, with these relevant attributes:

    messaging.operation: process,
    messaging.system: bullmq,
    otel.kind: CONSUMER,
    sentry.op: message,
    sentry.origin: manual,
    

    However, this transaction is empty. Its duration is just a few milliseconds (shorter than the job duration), and it contains no spans at all, even though there are PG queries inside (PG queries are correctly reported in our regular application tracing). We also see no reference to the producing side of the job, nor we see anything under the Queues section of Sentry.

    Not sure if you were able to get started on those docs you mentioned, but if you have some tips that could unblock us, we'd appreciate it 🙏

    Reacted by Jan Koeppen
  6. getsantry
    added
    Waiting for: Product Owner
    on Aug 22, 2024
  7. getsantry
    added this to GitHub Issues with 👀 3on Aug 22, 2024
  8. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 22, 2024
  9. andreiborza commented on Aug 23, 2024

    @andreiborza
    andreiborza
    on Aug 23, 2024
    Member
    More actions

    Hello, thanks for writing in. We are on company-wide hackweek and thus on limited support this week. We'll take a look at this next week.

  10. getsantry
    removed
    Waiting for: Product Owner
    on Aug 23, 2024
  11. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 23, 2024
  12. andreiborza
    added
    Post Hackweek
    on Aug 23, 2024
  13. iacobus commented on Aug 23, 2024

    @iacobus
    iacobus
    on Aug 23, 2024
    More actions

    Oh cool, have fun and thanks!

    Reacted by Andrei
  14. getsantry
    added
    Waiting for: Product Owner
    on Aug 23, 2024
  15. 35 remaining items

  16. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 21, 2025
  17. ghost added
    getsentry/sentry-javascript
    on Apr 7, 2025
  18. linear
    added
    Feature
    SDKs (New)
    on Apr 7, 2025
  19. stephanie-anderson
    removed
    SDKs (New)
    getsentry/sentry-javascript
    on Apr 8, 2025
  20. stephanie-anderson
    added
    Node.js
    and removed
    Package: node
    on Apr 16, 2025
  21. stephanie-anderson
    added
    Spans
    and removed
    Feature: Spans
    on Apr 30, 2025
  22. stephanie-anderson
    removed the
    Feature
    issue type on Aug 12, 2025
  23. JPeer264
    self-assigned this
    on Jun 25, 2026
  24. JPeer264
    closed this as completedin #21777on Oct 28, 2026
  25. kashish00208
    added a commit that references this issue on Oct 29, 2026

    feat(node): Add BullMQ integration (getsentry#21777)

    This issue will close once commit b722d3c is merged into the 'develop' branch.
    b722d3c
  26. github-actions commented on Nov 5, 2026

    @github-actions
    github-actionsBot
    on Nov 5, 2026 – with GitHub Actions
    Contributor
    More actions

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #21777, which was included in the 11.11.0 release.

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

Metadata

Metadata

Assignees

  • @JPeer264
    JPeer264

Labels

FeatureNode.jsSpans

Projects

  • GitHub Issues with 👀 3
    Status
    No status
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.