Skip to content

Commit 099e151

Browse files
fix: Remove Stackdriver from code samples
- The Stack Driver name is retired. Removed it from the code samples. - The code samples are used in https://firebase.google.com/docs/functions/reporting-errors b/206234506
1 parent a23a172 commit 099e151

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stripe/functions/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ exports.createStripePayment = functions.firestore
110110
await snap.ref.set(payment);
111111
} catch (error) {
112112
// We want to capture errors and render them in a user-friendly way, while
113-
// still logging an exception with StackDriver
113+
// still logging an exception to Error Reporting.
114114
functions.logger.log(error);
115115
await snap.ref.set({ error: userFacingMessage(error) }, { merge: true });
116116
await reportError(error, { user: context.params.userId });
@@ -163,17 +163,17 @@ exports.cleanupUser = functions.auth.user().onDelete(async (user) => {
163163
});
164164

165165
/**
166-
* To keep on top of errors, we should raise a verbose error report with Stackdriver rather
166+
* To keep on top of errors, we should raise a verbose error report with Error Reporting rather
167167
* than simply relying on functions.logger.error. This will calculate users affected + send you email
168168
* alerts, if you've opted into receiving them.
169169
*/
170170

171171
// [START reporterror]
172172

173173
function reportError(err, context = {}) {
174-
// This is the name of the StackDriver log stream that will receive the log
174+
// This is the name of the log stream that will receive the log
175175
// entry. This name can be any valid log stream name, but must contain "err"
176-
// in order for the error to be picked up by StackDriver Error Reporting.
176+
// in order for the error to be picked up by Error Reporting.
177177
const logName = 'errors';
178178
const log = logging.log(logName);
179179

0 commit comments

Comments
 (0)