-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Custom Tag not appearing on Error Event from Serverless Function in GCP #7222
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.
@sentry/serverless
SDK Version
7.31.1
Framework Version
No response
Link to Sentry event
Customer Event
SDK Setup
Sentry.GCPFunction.init({
dsn: "https://<>@o478484.ingest.sentry.io/<>",
tracesSampleRate: 1.0,
environment: process.env.<VAR>,
release: `<HIDDEN>`,
integrations: defaults => defaults.filter(integration => integration.name !== "Console"),
});
Steps to Reproduce
Context:
Customer trying to set the serverless Function Name as a tag, because the cloud function’s name is not on the event / they don’t know which Cloud Function (GCP) it came from.
Problem:
Set a custom tag, and it doesn’t appear on the Issue.event in Sentry.
ProblemUnderlying (Optional)
Maybe if the Function Name could appear by default in a tag, then the customer would not be trying to set a custom tag for it. Is that something we could make happen?
When an error occurs in a web server /endpoint (not Serverless architecture) you know where it occurred because of the tags
url:http://
transaction:
But in a serverless function error, the Cloud Function / Lambda name is equivalent to the url endpoint, in the user’s mind? And there’s no Function Name on the event? The stacktrace alone doesn’t guarantee you can figure out which URL/Endpoint or Cloud Function it came from, or does it?
Expected Result
Custom Tag should appear on the event linked
Actual Result
Custom Tag does not appear on the event linked