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

feat(node): Add amqplibIntegration #13714

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

feat(node): Add amqplibIntegration #13714

wants to merge 1 commit into from

Conversation

obecny
Copy link
Collaborator

@obecny obecny commented Sep 18, 2024

resolves #13312

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@obecny obecny requested a review from mydea September 18, 2024 08:25
Copy link
Contributor

github-actions bot commented Sep 18, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser - with treeshaking flags 21.3 KB - -
@sentry/browser (incl. Tracing) 34.8 KB - -
@sentry/browser (incl. Tracing, Replay) 71.26 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.7 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.61 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.39 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.23 KB - -
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.66 KB - -
@sentry/browser (incl. sendFeedback) 27.19 KB - -
@sentry/browser (incl. FeedbackAsync) 31.96 KB - -
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.77 KB - -
@sentry/vue 26.72 KB - -
@sentry/vue (incl. Tracing) 36.67 KB - -
@sentry/svelte 22.66 KB - -
CDN Bundle 23.83 KB - -
CDN Bundle (incl. Tracing) 36.56 KB - -
CDN Bundle (incl. Tracing, Replay) 71.02 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.33 KB - -
CDN Bundle - uncompressed 69.81 KB - -
CDN Bundle (incl. Tracing) - uncompressed 108.44 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.21 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.43 KB - -
@sentry/nextjs (client) 37.53 KB - -
@sentry/sveltekit (client) 35.37 KB - -
@sentry/node 124.05 KB +2.47% +2.99 KB 🔺
@sentry/node - without tracing 93.34 KB - -
@sentry/aws-serverless 103.05 KB - -

View base workflow run

@obecny obecny requested a review from timfish September 18, 2024 09:44
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Could you share some examples traces with this instrumentation active?

Let's also make sure that the spans generated from this instrumentation show up in the Queues Module in Sentry.

You can read more about the requirements for the queue module here: https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/custom-instrumentation/queues-module/

Copy link

codecov bot commented Sep 18, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
278 1 277 135
View the top 1 failed tests by shortest run time
tracing/metrics/handlers-lcp/test.ts should capture metrics for LCP instrumentation handlers
Stack Traces | 10.5s run time
test.ts:10:11 should capture metrics for LCP instrumentation handlers

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

channel: Channel;
};

export async function connectToRabbitMQ(): Promise<RabbitMQData> {
Copy link
Member

Choose a reason for hiding this comment

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

m: I would generally inline all of these into the scenario file, unless we have multiple scenarios that need to share this. If we only have a single scenario file (which is often the case) I would try to put all the scenario code into the scenario file, this makes it easier to parse tests etc. The same goes for constants, I'd also merge this into the file :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we might have more, I had some problem with testing one scenario and then just give up. But even though I like to keep things separated so it is easier to see things. Would rather avoid keeping all inside one file, WDYT ?

Copy link
Member

Choose a reason for hiding this comment

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

no strong feelings! I just generally would avoid premature optimization, we can always extract stuff out when we actually need a second file, but also I won't block this as it is now, it's OK like this too, just wanted to give general feedback :)

@@ -483,6 +483,7 @@ export function createRunner(...paths: string[]) {
method: 'get' | 'post',
path: string,
headers: Record<string, string> = {},
data?: any, // axios accept any as data
Copy link
Member

Choose a reason for hiding this comment

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

Do we actually need these changes now? I don't think so, unless I am missing something? :) If so, I'd just not do this change, no need to add stuff we don't need (and later nobody knows anymore if this is used somewhere etc.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well I needed them as first I was using post request and in this way you cannot sent the body as it was missing. The post request for axios expects body as 2nd param, but here you had headers which was wrong anyway - for post requests options like headers are passed as 3rd param, so imho this was bug anyway. I would leave it then

@obecny obecny changed the title Add amqplibIntegration to Node feat(amqplibIntegration): Add amqplibIntegration to Node Sep 18, 2024
@AbhiPrasad AbhiPrasad changed the title feat(amqplibIntegration): Add amqplibIntegration to Node feat(node): Add amqplibIntegration Sep 19, 2024
@AbhiPrasad
Copy link
Member

@obecny I changed the title to match our conventions - we typically make the scope of the PR title be the main package that is being updated (in this case, node because this is a node sdk feature).

@obecny
Copy link
Collaborator Author

obecny commented Sep 19, 2024

@obecny I changed the title to match our conventions - we typically make the scope of the PR title be the main package that is being updated (in this case, node because this is a node sdk feature).

thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add amqplibIntegration to Node
4 participants