Skip to content

Conversation

@J4YF7O
Copy link
Contributor

@J4YF7O J4YF7O commented Dec 9, 2022

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).

Description

It can be very interesting to build a specific context depending on the error. And especially in my case, the index. This allows to find the corresponding SQSRecord, and to design tags from the body. This increases greatly the debugging capacity, and filtering at the sentry interface level.

j4y-m added 7 commits December 9, 2022 22:44
…context for each captured promises

- Following getsentry#4130

# Description

It can be very interesting to build a specific context depending on the error. And especially in my case, the index. This allows to find the corresponding SQSRecord, and to design tags from the body. This increases greatly the debugging capacity, and filtering at the sentry interface level.
@AbhiPrasad
Copy link
Member

Hey @J4YF7O. We want to be careful when expanding the public API. What's the advantage of this being an option over you being able to create this yourself with a configureScope or Sentry.setTag / Sentry.setContext call?

@AbhiPrasad AbhiPrasad added the Package: serverless Issues related to the Sentry Serverless SDK label Dec 13, 2022
@J4YF7O
Copy link
Contributor Author

J4YF7O commented Dec 13, 2022

Hey @J4YF7O. We want to be careful when expanding the public API. What's the advantage of this being an option over you being able to create this yourself with a configureScope or Sentry.setTag / Sentry.setContext call?

Hey @AbhiPrasad ,

I make a diagram to explain "what's wrong".

In a system of lambda + sqs
The goal, is to have, for each SQSRecord contained in my SQSEvent, an independent promise, and that this promise can throw an error that will be captured as exception by the sentry wrapper.
This is already possible with the captureAllSettledReasons parameter.

But unfortunately, there is no context related to the SQSRecord. So when one of the promises fails, I have no information in my sentry panel to trace the source of the error.

I have to search in the logs every time. But as I batch 1000 messages, it's very complicated to go up all the "log tree" of each promise.

Screenshot 2022-12-13 at 15 36 10


I tried with configureScope but I can't use it to wrap my SQSRecord's Promises, because the return is necessarily "void". So it doesn't work with my use case and my Promise.allSettled.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@github-actions github-actions bot closed this Jan 11, 2023
@J4YF7O J4YF7O deleted the feat/awslambda-settled-context branch January 13, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Package: serverless Issues related to the Sentry Serverless SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants