Skip to content

Conversation

@wconti27
Copy link
Contributor

What does this PR do?

AI GENERATED integration for bullmq

Motivation

Plugin Checklist

Additional Notes

@wconti27 wconti27 self-assigned this Dec 16, 2025
@github-actions
Copy link

github-actions bot commented Dec 16, 2025

Overall package size

Self size: 4.35 MB
Deduped: 5.23 MB
No deduping: 5.23 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 1.15.0 | 127.66 kB | 856.24 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.74%. Comparing base (c67f394) to head (c472a1d).

Files with missing lines Patch % Lines
...d-trace/src/service-naming/schemas/v0/messaging.js 0.00% 4 Missing ⚠️
...ages/datadog-instrumentations/src/helpers/hooks.js 0.00% 1 Missing ⚠️
packages/dd-trace/src/plugins/index.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           conti/all-tooling-changes    #7123      +/-   ##
=============================================================
- Coverage                      84.77%   84.74%   -0.04%     
=============================================================
  Files                            521      521              
  Lines                          22162    22162              
=============================================================
- Hits                           18788    18781       -7     
- Misses                          3374     3381       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

"private": true,
"dependencies": {
"@ai-sdk/openai": "2.0.65",
"@anthropic-ai/sdk": "0.68.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow sorts this file, so that explains the sorting change. really only 1 line for bullmq was added

describe('Queue.add() - bullmq.add', () => {
it('should generate span with correct tags (happy path)', async () => {
const traceAssertion = agent.assertSomeTraces((traces) => {
const spans = traces[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer using the assertFirstTrace function that supports including the span object shape instead of separate assertion lines. assertFirstTrace name may be confusing the agent.

@pr-commenter
Copy link

pr-commenter bot commented Dec 16, 2025

Benchmarks

Benchmark execution time: 2025-12-22 18:38:08

Comparing candidate commit c472a1d in PR branch conti/bullmq-auto-generated with baseline commit c67f394 in branch conti/all-tooling-changes.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 288 metrics, 32 unstable metrics.

@wconti27 wconti27 added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Dec 16, 2025
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/plugins/test
with:
dd_api_key: ${{{{ secrets.DD_API_KEY }}}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn son, heard you like curly braces

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happened in the NATS PR as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easy fix! And simon's comment made me "lol"


module.exports = [
...require('./langchain')
...require('./langchain'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add this change to node file generators.

Comment on lines +33 to +36
const producerSpan = spans.find(span => span.name === 'bullmq.add')
if (!producerSpan) {
throw new Error('Producer span bullmq.add not found')
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this would be more idiomatic:

Suggested change
const producerSpan = spans.find(span => span.name === 'bullmq.add')
if (!producerSpan) {
throw new Error('Producer span bullmq.add not found')
}
const producerSpan = spans.find(span => span.name === 'bullmq.add')
expect(producerSpan, 'Producer span bullmq.add not found').to.be.ok

Comment on lines 70 to 73
redis:
image: redis:4.0-alpine
image: redis:7.0-alpine
ports:
- "127.0.0.1:6379:6379"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is okay... Redis is good about backwards compatibility. So even though we're testing old library versions they should behave the same with a newer Redis.

Another approach is to add a separate image just for bullmq stuff:

  redis:
    image: redis:7.0-alpine
    ports:
      - "127.0.0.1:16379:6379"

^ that would avoid port conflicts and would also need the test code to use port 16379 instead of the default 6379. But I'll defer to others.

@tlhunter
Copy link
Member

Shouldn't there be a new Platform / instrumentation-bullmq (pull_request) action?

@wconti27
Copy link
Contributor Author

Shouldn't there be a new Platform / instrumentation-bullmq (pull_request) action?

@tlhunter What is this? I'm not aware of what this is

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 18, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

[email protected] esm flaky test retries retries DD_CIVISIBILITY_FLAKY_RETRY_COUNT times from integration-tests/cypress/cypress.spec.js (Datadog) (Fix with Cursor)
Expected values to be strictly equal:

0 !== 1

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c472a1d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@wconti27 wconti27 requested a review from tlhunter December 18, 2025 16:01
@tlhunter
Copy link
Member

@wconti27 What is this? I'm not aware of what this is

I was saying we need a new test to appear in the list of github actions that have executed as a result of this pull request. Such a test was not present when I reviewed previously but is now working.

Screenshot 2025-12-18 at 11 53 25

Comment on lines +17 to +19
const edgeTags = isProducer
? ['direction:out', `topic:${queueName}`, 'type:bullmq']
: ['direction:in', `topic:${queueName}`, 'type:bullmq']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const edgeTags = isProducer
? ['direction:out', `topic:${queueName}`, 'type:bullmq']
: ['direction:in', `topic:${queueName}`, 'type:bullmq']
const edgeTags = [isProducer ? 'direction:out' : 'direction:in', `topic:${queueName}`, 'type:bullmq']

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

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants