Cloud Functions ব্যবহার করে, আপনি আপনার Cloud Firestore ডেটাবেসের পরিবর্তনের ফলে সৃষ্ট ইভেন্টগুলো পরিচালনা করার জন্য কোড ডেপ্লয় করতে পারেন। এর মাধ্যমে আপনি নিজস্ব সার্ভার না চালিয়েই আপনার অ্যাপে সার্ভার-সাইড কার্যকারিতা যোগ করতে পারবেন।
Cloud Functions (২য় প্রজন্ম)
Cloud Run এবং Eventarc দ্বারা চালিত, Cloud Functions for Firebase (2nd gen) আপনাকে আরও শক্তিশালী পরিকাঠামো, পারফরম্যান্স ও স্কেলেবিলিটির উপর উন্নত নিয়ন্ত্রণ এবং ফাংশন রানটাইমের উপর আরও বেশি নিয়ন্ত্রণ প্রদান করে। 2nd gen সম্পর্কে আরও তথ্যের জন্য, Cloud Functions for Firebase (2nd gen) দেখুন।
Cloud Firestore function triggers
The Cloud Functions for Firebase SDK exports the following Cloud Firestore event triggers to let you create handlers tied to specific Cloud Firestore events:
নোড.জেএস
| ইভেন্টের ধরণ | ট্রিগার |
|---|---|
onDocumentCreated | কোনো ডকুমেন্টে প্রথমবারের মতো কিছু লেখা হলে এটি সক্রিয় হয়। |
onDocumentUpdated | যখন কোনো ডকুমেন্ট আগে থেকেই বিদ্যমান থাকে এবং তার কোনো মান পরিবর্তিত হয়, তখন এটি সক্রিয় হয়। |
onDocumentDeleted | কোনো নথি মুছে ফেলা হলে এটি সক্রিয় হয়। |
onDocumentWritten | Triggered when onDocumentCreated , onDocumentUpdated or onDocumentDeleted is triggered. |
onDocumentCreatedWithAuthContext | onDocumentCreated with additional authentication information |
onDocumentWrittenWithAuthContext | onDocumentWritten with additional authentication information |
onDocumentDeletedWithAuthContext | onDocumentDeleted with additional authentication information |
onDocumentUpdatedWithAuthContext | onDocumentUpdated with additional authentication information |
পাইথন
| ইভেন্টের ধরণ | ট্রিগার |
|---|---|
on_document_created | কোনো ডকুমেন্টে প্রথমবারের মতো কিছু লেখা হলে এটি সক্রিয় হয়। |
on_document_updated | যখন কোনো ডকুমেন্ট আগে থেকেই বিদ্যমান থাকে এবং তার কোনো মান পরিবর্তিত হয়, তখন এটি সক্রিয় হয়। |
on_document_deleted | কোনো নথি মুছে ফেলা হলে এটি সক্রিয় হয়। |
on_document_written | Triggered when on_document_created , on_document_updated or on_document_deleted is triggered. |
on_document_created_with_auth_context | on_document_created with additional authentication information |
on_document_updated_with_auth_context | on_document_updated with additional authentication information |
on_document_deleted_with_auth_context | on_document_deleted with additional authentication information |
on_document_written_with_auth_context | on_document_written with additional authentication information |
Cloud Firestore ইভেন্ট শুধুমাত্র ডকুমেন্টের পরিবর্তনের ফলেই ট্রিগার হয়। Cloud Firestore ডকুমেন্টে এমন কোনো আপডেট করা হলে যেখানে ডেটা অপরিবর্তিত থাকে (একটি নো-অপ রাইট), তখন কোনো আপডেট বা রাইট ইভেন্ট তৈরি হয় না। নির্দিষ্ট ফিল্ডে ইভেন্ট যোগ করা সম্ভব নয়।
আপনার প্রজেক্টে যদি এখনও Cloud Functions for Firebase সক্রিয় করা না থাকে, তাহলে আপনার Cloud Functions for Firebase Cloud Functions for Firebase (2nd gen) পড়ুন।
Cloud Firestore -ট্রিগারড ফাংশন লেখা
একটি ফাংশন ট্রিগার সংজ্ঞায়িত করুন
একটি Cloud Firestore ট্রিগার নির্ধারণ করতে, একটি ডকুমেন্ট পাথ এবং একটি ইভেন্ট টাইপ নির্দিষ্ট করুন:
নোড.জেএস
const {
onDocumentWritten,
onDocumentCreated,
onDocumentUpdated,
onDocumentDeleted,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.myfunction = onDocumentWritten("my-collection/{docId}", (event) => {
/* ... */
});
পাইথন
from firebase_functions.firestore_fn import (
on_document_created,
on_document_deleted,
on_document_updated,
on_document_written,
Event,
Change,
DocumentSnapshot,
)
@on_document_created(document="users/{userId}")
def myfunction(event: Event[DocumentSnapshot]) -> None:
ডকুমেন্ট পাথ কোনো নির্দিষ্ট ডকুমেন্ট অথবা ওয়াইল্ডকার্ড প্যাটার্নকে নির্দেশ করতে পারে।
একটি একক নথি নির্দিষ্ট করুন
যদি আপনি কোনো নির্দিষ্ট ডকুমেন্টের যেকোনো পরিবর্তনের জন্য একটি ইভেন্ট ট্রিগার করতে চান, তাহলে আপনি নিম্নলিখিত ফাংশনটি ব্যবহার করতে পারেন।
নোড.জেএস
const {
onDocumentWritten,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.myfunction = onDocumentWritten("users/marie", (event) => {
// Your code here
});
পাইথন
from firebase_functions.firestore_fn import (
on_document_written,
Event,
Change,
DocumentSnapshot,
)
@on_document_written(document="users/marie")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
ওয়াইল্ডকার্ড ব্যবহার করে নথির একটি গোষ্ঠী নির্দিষ্ট করুন
যদি আপনি একদল ডকুমেন্টের সাথে, যেমন কোনো নির্দিষ্ট কালেকশনের যেকোনো ডকুমেন্টের সাথে, একটি ট্রিগার সংযুক্ত করতে চান, তাহলে ডকুমেন্ট আইডির পরিবর্তে একটি {wildcard} ব্যবহার করুন:
নোড.জেএস
const {
onDocumentWritten,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.myfunction = onDocumentWritten("users/{userId}", (event) => {
// If we set `/users/marie` to {name: "Marie"} then
// event.params.userId == "marie"
// ... and ...
// event.data.after.data() == {name: "Marie"}
});
পাইথন
from firebase_functions.firestore_fn import (
on_document_written,
Event,
Change,
DocumentSnapshot,
)
@on_document_written(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# If we set `/users/marie` to {name: "Marie"} then
event.params["userId"] == "marie" # True
# ... and ...
event.data.after.to_dict() == {"name": "Marie"} # True
এই উদাহরণে, যখন users যেকোনো ডকুমেন্টের যেকোনো ফিল্ড পরিবর্তন করা হয়, তখন তা userId নামক একটি ওয়াইল্ডকার্ডের সাথে মিলে যায়।
If a document in users has subcollections and a field in one of those subcollections' documents is changed, the userId wildcard is not triggered.
ডকুমেন্ট পাথ থেকে ওয়াইল্ডকার্ড ম্যাচগুলো বের করে event.params এ সংরক্ষণ করা হয়। আপনি সুনির্দিষ্ট কালেকশন বা ডকুমেন্ট আইডির পরিবর্তে আপনার পছন্দমতো যত খুশি ওয়াইল্ডকার্ড ব্যবহার করতে পারেন, উদাহরণস্বরূপ:
নোড.জেএস
const {
onDocumentWritten,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.myfunction = onDocumentWritten("users/{userId}/{messageCollectionId}/{messageId}", (event) => {
// If we set `/users/marie/incoming_messages/134` to {body: "Hello"} then
// event.params.userId == "marie";
// event.params.messageCollectionId == "incoming_messages";
// event.params.messageId == "134";
// ... and ...
// event.data.after.data() == {body: "Hello"}
});
পাইথন
from firebase_functions.firestore_fn import (
on_document_written,
Event,
Change,
DocumentSnapshot,
)
@on_document_written(document="users/{userId}/{messageCollectionId}/{messageId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# If we set `/users/marie/incoming_messages/134` to {body: "Hello"} then
event.params["userId"] == "marie" # True
event.params["messageCollectionId"] == "incoming_messages" # True
event.params["messageId"] == "134" # True
# ... and ...
event.data.after.to_dict() == {"body": "Hello"}
আপনার ট্রিগারকে অবশ্যই একটি ডকুমেন্ট নির্দেশ করতে হবে, এমনকি যদি আপনি ওয়াইল্ডকার্ড ব্যবহার করেন। উদাহরণস্বরূপ, users/{userId}/{messageCollectionId} বৈধ নয় কারণ {messageCollectionId} একটি কালেকশন। তবে, users/{userId}/{messageCollectionId}/{messageId} বৈধ, কারণ {messageId} সর্বদা একটি ডকুমেন্ট নির্দেশ করবে।
ইভেন্ট ট্রিগার
নতুন ডকুমেন্ট তৈরি হলে একটি ফাংশন চালু করুন।
You can trigger a function to fire any time a new document is created in a collection. This example function triggers every time a new user profile is added:
নোড.জেএস
const {
onDocumentCreated,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.createuser = onDocumentCreated("users/{userId}", (event) => {
// Get an object representing the document
// e.g. {'name': 'Marie', 'age': 66}
const snapshot = event.data;
if (!snapshot) {
console.log("No data associated with the event");
return;
}
const data = snapshot.data();
// access a particular field as you would any JS property
const name = data.name;
// perform more operations ...
});
For additional authentication information, use onDocumentCreatedWithAuthContext .
পাইথন
from firebase_functions.firestore_fn import (
on_document_created,
Event,
DocumentSnapshot,
)
@on_document_created(document="users/{userId}")
def myfunction(event: Event[DocumentSnapshot]) -> None:
# Get a dictionary representing the document
# e.g. {'name': 'Marie', 'age': 66}
new_value = event.data.to_dict()
# Access a particular field as you would any dictionary
name = new_value["name"]
# Perform more operations ...
যখন কোনো ডকুমেন্ট আপডেট করা হয় তখন একটি ফাংশন ট্রিগার করুন।
You can also trigger a function to fire when a document is updated. This example function fires if a user changes their profile:
নোড.জেএস
const {
onDocumentUpdated,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.updateuser = onDocumentUpdated("users/{userId}", (event) => {
// Get an object representing the document
// e.g. {'name': 'Marie', 'age': 66}
const newValue = event.data.after.data();
// access a particular field as you would any JS property
const name = newValue.name;
// perform more operations ...
});
For additional authentication information, use onDocumentUpdatedWithAuthContext .
পাইথন
from firebase_functions.firestore_fn import (
on_document_updated,
Event,
Change,
DocumentSnapshot,
)
@on_document_updated(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# Get a dictionary representing the document
# e.g. {'name': 'Marie', 'age': 66}
new_value = event.data.after.to_dict()
# Access a particular field as you would any dictionary
name = new_value["name"]
# Perform more operations ...
যখন কোনো ডকুমেন্ট মুছে ফেলা হয় তখন একটি ফাংশন সক্রিয় করুন।
You can also trigger a function when a document is deleted. This example function fires when a user deletes their user profile:
নোড.জেএস
const {
onDocumentDeleted,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.deleteuser = onDocumentDeleted("users/{userId}", (event) => {
// Get an object representing the document
// e.g. {'name': 'Marie', 'age': 66}
const snap = event.data;
const data = snap.data();
// perform more operations ...
});
For additional authentication information, use onDocumentDeletedWithAuthContext .
পাইথন
from firebase_functions.firestore_fn import (
on_document_deleted,
Event,
DocumentSnapshot,
)
@on_document_deleted(document="users/{userId}")
def myfunction(event: Event[DocumentSnapshot|None]) -> None:
# Perform more operations ...
একটি ডকুমেন্টের সমস্ত পরিবর্তনের জন্য একটি ফাংশন সক্রিয় করুন।
কোন ধরনের ইভেন্ট ফায়ার হচ্ছে তা নিয়ে যদি আপনার কোনো মাথাব্যথা না থাকে, তাহলে আপনি 'ডকুমেন্ট রিটেন' ইভেন্ট ট্রিগারটি ব্যবহার করে একটি Cloud Firestore ডকুমেন্টের সমস্ত পরিবর্তন পর্যবেক্ষণ করতে পারেন। এই উদাহরণ ফাংশনটি ফায়ার হয় যখন কোনো ব্যবহারকারী তৈরি, আপডেট বা ডিলিট করা হয়:
নোড.জেএস
const {
onDocumentWritten,
Change,
FirestoreEvent
} = require('firebase-functions/v2/firestore');
exports.modifyuser = onDocumentWritten("users/{userId}", (event) => {
// Get an object with the current document values.
// If the document does not exist, it was deleted
const document = event.data.after.data();
// Get an object with the previous document values
const previousValues = event.data.before.data();
// perform more operations ...
});
For additional authentication information, use onDocumentWrittenWithAuthContext .
পাইথন
from firebase_functions.firestore_fn import (
on_document_written,
Event,
Change,
DocumentSnapshot,
)
@on_document_written(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot | None]]) -> None:
# Get an object with the current document values.
# If the document does not exist, it was deleted.
document = (event.data.after.to_dict()
if event.data.after is not None else None)
# Get an object with the previous document values.
# If the document does not exist, it was newly created.
previous_values = (event.data.before.to_dict()
if event.data.before is not None else None)
# Perform more operations ...
ডেটা পড়া এবং লেখা
যখন কোনো ফাংশন ট্রিগার হয়, তখন এটি ইভেন্ট-সম্পর্কিত ডেটার একটি স্ন্যাপশট প্রদান করে। আপনি এই স্ন্যাপশটটি ব্যবহার করে ইভেন্টটি ট্রিগার করা ডকুমেন্ট থেকে ডেটা পড়তে বা তাতে লিখতে পারেন, অথবা আপনার ডাটাবেসের অন্যান্য অংশ অ্যাক্সেস করার জন্য Firebase Admin SDK ব্যবহার করতে পারেন।
ইভেন্ট ডেটা
ডেটা পড়া
যখন কোনো ফাংশন ট্রিগার হয়, তখন আপনার আপডেট হওয়া কোনো ডকুমেন্ট থেকে ডেটা অথবা আপডেটের আগের ডেটা পাওয়ার প্রয়োজন হতে পারে। আপনি event.data.before ব্যবহার করে আগের ডেটা পেতে পারেন, যাতে আপডেটের আগের ডকুমেন্ট স্ন্যাপশটটি থাকে। একইভাবে, event.data.after এ আপডেটের পরের ডকুমেন্ট স্ন্যাপশট অবস্থাটি থাকে।
নোড.জেএস
exports.updateuser2 = onDocumentUpdated("users/{userId}", (event) => {
// Get an object with the current document values.
// If the document does not exist, it was deleted
const newValues = event.data.after.data();
// Get an object with the previous document values
const previousValues = event.data.before.data();
});
পাইথন
@on_document_updated(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# Get an object with the current document values.
new_value = event.data.after.to_dict()
# Get an object with the previous document values.
prev_value = event.data.before.to_dict()
আপনি অন্য যেকোনো অবজেক্টের মতোই প্রোপার্টিগুলো অ্যাক্সেস করতে পারেন। বিকল্পভাবে, নির্দিষ্ট ফিল্ড অ্যাক্সেস করার জন্য আপনি get ফাংশনটি ব্যবহার করতে পারেন:
নোড.জেএস
// Fetch data using standard accessors
const age = event.data.after.data().age;
const name = event.data.after.data()['name'];
// Fetch data using built in accessor
const experience = event.data.after.data.get('experience');
পাইথন
# Get the value of a single document field.
age = event.data.after.get("age")
# Convert the document to a dictionary.
age = event.data.after.to_dict()["age"]
ডেটা লেখা
Each function invocation is associated with a specific document in your Cloud Firestore database. You can access that document in the snapshot returned to your function.
The document reference includes methods like update() , set() , and remove() so you can modify the document that triggered the function.
নোড.জেএস
const {onDocumentUpdated} = require('firebase-functions/v2/firestore');
exports.countnamechanges = onDocumentUpdated('users/{userId}', (event) => {
// Retrieve the current and previous value
const data = event.data.after.data();
const previousData = event.data.before.data();
// We'll only update if the name has changed.
// This is crucial to prevent infinite loops.
if (data.name == previousData.name) {
return null;
}
// Retrieve the current count of name changes
let count = data.name_change_count;
if (!count) {
count = 0;
}
// Then return a promise of a set operation to update the count
return event.data.after.ref.set({
name_change_count: count + 1
}, {merge: true});
});
পাইথন
@on_document_updated(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# Get the current and previous document values.
new_value = event.data.after
prev_value = event.data.before
# We'll only update if the name has changed.
# This is crucial to prevent infinite loops.
if new_value.get("name") == prev_value.get("name"):
return
# Retrieve the current count of name changes
count = new_value.to_dict().get("name_change_count", 0)
# Update the count
new_value.reference.update({"name_change_count": count + 1})
ব্যবহারকারীর প্রমাণীকরণ তথ্য অ্যাক্সেস করুন
আপনি যদি নিম্নলিখিত ইভেন্ট প্রকারগুলির মধ্যে একটি ব্যবহার করেন, তাহলে আপনি সেই প্রিন্সিপালের ব্যবহারকারী প্রমাণীকরণ তথ্য অ্যাক্সেস করতে পারবেন যিনি ইভেন্টটি ট্রিগার করেছেন। এই তথ্যটি মূল ইভেন্টে প্রাপ্ত তথ্যের অতিরিক্ত।
নোড.জেএস
-
onDocumentCreatedWithAuthContext -
onDocumentWrittenWithAuthContext -
onDocumentDeletedWithAuthContext -
onDocumentUpdatedWithAuthContext
পাইথন
-
on_document_created_with_auth_context -
on_document_updated_with_auth_context -
on_document_deleted_with_auth_context -
on_document_written_with_auth_context
For information about the data available in the authentication context, see Auth Context . The following example demonstrates how to retrieve authentication information:
নোড.জেএস
const {onDocumentWrittenWithAuthContext} = require('firebase-functions/v2/firestore');
exports.syncUser = onDocumentWrittenWithAuthContext("users/{userId}", (event) => {
const snapshot = event.data.after;
if (!snapshot) {
console.log("No data associated with the event");
return;
}
const data = snapshot.data();
// retrieve auth context from event
const { authType, authId } = event;
let verified = false;
if (authType === "system") {
// system-generated users are automatically verified
verified = true;
} else if (authType === "unknown" || authType === "unauthenticated") {
// admin users from a specific domain are verified
if (authId.endsWith("@example.com")) {
verified = true;
}
}
return data.after.ref.set({
created_by: authId,
verified,
}, {merge: true});
});
পাইথন
@on_document_updated_with_auth_context(document="users/{userId}")
def myfunction(event: Event[Change[DocumentSnapshot]]) -> None:
# Get the current and previous document values.
new_value = event.data.after
prev_value = event.data.before
# Get the auth context from the event
user_auth_type = event.auth_type
user_auth_id = event.auth_id
ট্রিগার ইভেন্টের বাইরের ডেটা
Cloud Functions execute in a trusted environment. They are authorized as a service account on your project, and you can perform reads and writes using the Firebase Admin SDK :
নোড.জেএস
const { initializeApp } = require('firebase-admin/app');
const { getFirestore, Timestamp, FieldValue } = require('firebase-admin/firestore');
initializeApp();
const db = getFirestore();
exports.writetofirestore = onDocumentWritten("some/doc", (event) => {
db.doc('some/otherdoc').set({ ... });
});
exports.writetofirestore = onDocumentWritten('users/{userId}', (event) => {
db.doc('some/otherdoc').set({
// Update otherdoc
});
});
পাইথন
from firebase_admin import firestore, initialize_app
import google.cloud.firestore
initialize_app()
@on_document_written(document="some/doc")
def myfunction(event: Event[Change[DocumentSnapshot | None]]) -> None:
firestore_client: google.cloud.firestore.Client = firestore.client()
firestore_client.document("another/doc").set({
# ...
})
সীমাবদ্ধতা
Note the following limitations for Cloud Firestore triggers for Cloud Functions :
- Cloud Functions (১ম জেনারেশন) ব্যবহারের জন্য ফায়ারস্টোর নেটিভ মোডে একটি বিদ্যমান "(ডিফল্ট)" ডেটাবেস থাকা আবশ্যক। এটি Cloud Firestore নেমড ডেটাবেস বা ডেটাস্টোর মোড সমর্থন করে না। এই ধরনের ক্ষেত্রে ইভেন্ট কনফিগার করার জন্য অনুগ্রহ করে Cloud Functions (২য় জেনারেশন) ব্যবহার করুন।
- Cloud Functions এবং Cloud Firestore ট্রিগারের ক্ষেত্রে ক্রস-প্রজেক্ট সেটআপ একটি সীমাবদ্ধতা। Cloud Firestore ট্রিগার সেটআপ করার জন্য Cloud Functions অবশ্যই একই প্রজেক্টে থাকতে হবে।
- ক্রম নিশ্চিত নয়। দ্রুত পরিবর্তনের ফলে ফাংশনগুলো অপ্রত্যাশিত ক্রমে চালু হতে পারে।
- ইভেন্টগুলো অন্তত একবার ডেলিভার করা হয়, কিন্তু একটিমাত্র ইভেন্টের ফলে একাধিকবার ফাংশন কল হতে পারে। এক্স্যাক্টলি-ওয়ান্স মেকানিক্সের উপর নির্ভর করা পরিহার করুন এবং আইডম্পোটেন্ট ফাংশন লিখুন।
- ডেটাস্টোর মোডে Cloud Firestore ব্যবহার করতে Cloud Functions (২য় জেনারেশন) প্রয়োজন। Cloud Functions (১ম জেনারেশন) ডেটাস্টোর মোড সমর্থন করে না।
- একটি ট্রিগার একটিমাত্র ডেটাবেসের সাথে যুক্ত থাকে। আপনি একাধিক ডেটাবেসের সাথে মেলে এমন ট্রিগার তৈরি করতে পারবেন না।
- একটি ডাটাবেস মুছে ফেললে সেই ডাটাবেসের কোনো ট্রিগার স্বয়ংক্রিয়ভাবে মুছে যায় না। ট্রিগারটি ইভেন্ট পাঠানো বন্ধ করে দেয়, কিন্তু আপনি ট্রিগারটি মুছে না ফেলা পর্যন্ত এর অস্তিত্ব বজায় থাকে।
- যদি কোনো মিলে যাওয়া ইভেন্ট সর্বোচ্চ অনুরোধের আকার অতিক্রম করে, তাহলে ইভেন্টটি Cloud Functions (১ম প্রজন্ম)-এ সরবরাহ নাও করা হতে পারে।
- অনুরোধের আকারের কারণে যে ইভেন্টগুলো ডেলিভারি করা হয় না, সেগুলো প্ল্যাটফর্ম লগে নথিভুক্ত করা হয় এবং প্রজেক্টের লগ ব্যবহারের হিসাবে গণনা করা হয়।
- আপনি এই লগগুলি লগস এক্সপ্লোরারে "Event cannot deliver to Cloud function due to size exceeding the limit for 1st gen..." এই
errorসিভিয়ারিটি মেসেজ সহ খুঁজে পাবেন। আপনিfunctionNameফিল্ডের অধীনে ফাংশনের নামটি খুঁজে পাবেন। যদিreceiveTimestampফিল্ডটি এখন থেকে এক ঘণ্টার মধ্যে থাকে, তাহলে আপনি টাইমস্ট্যাম্পের আগের এবং পরের একটি স্ন্যাপশট দিয়ে সংশ্লিষ্ট ডকুমেন্টটি পড়ে প্রকৃত ইভেন্টের বিষয়বস্তু অনুমান করতে পারবেন। - এই ধরনের ছন্দ এড়াতে, আপনি যা করতে পারেন:
- Cloud Functions (২য় প্রজন্ম)-এ মাইগ্রেট এবং আপগ্রেড করুন
- ডকুমেন্টটির আকার ছোট করুন
- প্রশ্নোক্ত Cloud Functions মুছে ফেলুন
- আপনি এক্সক্লুশন ব্যবহার করে লগিং বন্ধ করতে পারেন, কিন্তু মনে রাখবেন যে আপত্তিকর ইভেন্টগুলো তখনও ডেলিভার করা হবে না।