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

ref(serverless): Point DSN to relay in lambda extension #5126

Conversation

antonpirker
Copy link
Member

If the serverless SDK is running in an AWS Lambda Function it should not send data directly to sentry.io but to the relay that is running in the AWS Lambda Extension (which is running on localhost:3000)

This PR parses the DSN and changes the host and port to point to localhost:3000.

@antonpirker antonpirker changed the base branch from master to 7.x May 18, 2022 12:59
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.75 KB (-6.91% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 58.19 KB (-9.95% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.65 KB (-6.45% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.09 KB (-10.14% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.33 KB (-16.82% 🔽)
@sentry/browser - Webpack (minified) 61.44 KB (-24.81% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.35 KB (-16.87% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.82 KB (-10.91% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.41 KB (-6.4% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23 KB (-6.08% 🔽)

@antonpirker antonpirker merged commit 8d08a8b into 7.x May 18, 2022
@antonpirker antonpirker deleted the antonpirker/WEBBACKEND-144-point-dsn-to-relay-in-lambda-extension branch May 18, 2022 13:10
@AbhiPrasad
Copy link
Member

Isn't this a breaking change? What if someone does not want to use the AWS Lambda Extension?

AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
…ion. (#5126)

If the serverless SDK is running in an AWS Lambda Function it should not send data directly to sentry.io but to the relay that is running in the AWS Lambda Extension (which is running on localhost:3000)

This PR parses the DSN and changes the host and port to point to localhost:3000.
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 30, 2022
@jshearer
Copy link

jshearer commented Jun 6, 2022

Hi there @AbhiPrasad @sl0thentr0py @antonpirker! We just tried to set up Sentry in AWS lambda, and through much debugging and digging, came across this commit/PR. Uh.. are there any docs on this? What is AWS lambda extension? How do we report data from lambda to sentry? As it is right now, we just get opaque "connection refused to 127.0.0.1:3000" errors... ☹️

Edit: We followed the docs here, which mention nothing about this stuff :s

Edit 2: For any folks coming to find this from search, we solved this by pinning our sentry dependencies to 6.x, as clearly 7.x is not supposed to be live yet

Thanks!

@antonpirker
Copy link
Member Author

Hey @jshearer
Thanks for reporting this and sorry for your inconveniences!
This is entirely my fault. This PR should not have been released with V7, because it belongs to the new AWS Lambda integration we are developing right now.

I will supply a patch as soon as possible.
In the mean time, yes pinning to 6.x is the best way to "fix" this. But soon we will release an update to 7.x to include a patch for this, so you get also all the new 7.x stuff!

I will keep you posted!

@antonpirker
Copy link
Member Author

Hey @jshearer !

Just for the record, you did everything correct! I messed up.
I created a patch for this in #5212 and this will be released soon.

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.

4 participants