יומני שגיאות של שאילתות לתוספים של Google Workspace
קל לארגן דפים בעזרת אוספים אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כשתוסף Google Workspace שפורסם מחזיר הודעת שגיאה, הממשק של התוסף מחזיר את ההודעה הכללית "משהו השתבש בהפעלת התוסף". עם זאת, השגיאות האלה מתועדות ב-Cloud Logs Explorer.
במדריך הזה נסביר איך להריץ שאילתות ביומני השגיאות של התוספים ב-Cloud Logs Explorer, כדי שתוכלו:
לבדוק אם המשתמשים נתקלים בשגיאות.
לראות באיזו תדירות מתרחשות שגיאות ואילו שגיאות הן הנפוצות ביותר.
קריאת הודעות שגיאה תיאוריות שיעזרו לכם לתקן אותן.
דרישות מוקדמות
לפני ששולחים שאילתה לגבי יומני השגיאות של התוספים:
כדי לראות את השגיאות האחרונות, לוחצים על Run query. לחלופין, כדי לראות את השגיאות בזמן שהן מתרחשות, לוחצים על Stream logs. יומני השגיאות של התוספים מופיעים בחלונית 'תוצאות השאילתה'.
מידע נוסף על Cloud Logs Explorer ועל כתיבת שאילתות זמין במאמרים הבאים:
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-12-22 (שעון UTC)."],[[["\u003cp\u003eGoogle Workspace add-ons log errors to Cloud Logs Explorer, providing detailed error messages for troubleshooting.\u003c/p\u003e\n"],["\u003cp\u003eTo view these logs, enable the Cloud Logging API, publish your add-on, and then query the logs using the provided instructions and query.\u003c/p\u003e\n"],["\u003cp\u003eYou can control error logging behavior through the \u003ccode\u003eexceptionLogging\u003c/code\u003e setting in your add-on's manifest file.\u003c/p\u003e\n"],["\u003cp\u003eRemember that only errors are logged, messages are in English, and Cloud Logging usage may incur costs.\u003c/p\u003e\n"]]],["Published Google Workspace add-on errors are logged in Cloud Logs Explorer, offering detailed insights beyond the generic interface message. To access these logs, enable the \"Cloud Logging API\" and publish the add-on. Query logs in the Logs Explorer using `severity\u003e=ERROR` and `protoPayload.serviceName=\"gsuiteaddons.googleapis.com\"`. Error logging is enabled by default, controlled via the `exceptionLogging` key in the manifest file. Only errors are logged, messages are always in English, and Cloud Logging incurs costs.\n"],null,["When a published Google Workspace add-on returns an error, the\nadd-on interface returns a generic message of\n\"Something went wrong when executing the add-on.\" However, these errors are\nlogged to [Cloud Logs Explorer](https://cloud.google.com/logging/docs/view/logs-viewer-interface).\n| **Note:** For Apps Script, if your add-on is deployed as a test, then errors are reported in both the Cloud Logs Explorer and in the add-on interface.\n|\n|\n| For example, an add-on test deployment might display an\n| error message like this in its interface: `TypeError:\n| card.INVALIDFUNCTIONNAME\n| is not a function [line: 33, function: getContextualAddOn, file:\n| GetContextualAddOn]`.\n|\n|\n| Although error messages like this are helpful, additional information is\n| available in the Logs Explorer. As a best practice, query the error logs for\n| more information. For further information about testing\n| add-on deployments, refer to\n| [Test and debug Google Workspace add-ons](/workspace/add-ons/guides/debug).\n\nThis guide describes how to query add-on error logs in\nCloud Logs Explorer, so you can:\n\n- Learn if users encounter errors.\n- See how often errors occur, and which are most frequent.\n- Read descriptive error messages that help you fix them.\n\nPrerequisites\n\nBefore querying add-on error logs:\n\n- Enable the \"Cloud Logging API\" in the add-on's Google Cloud project. To enable an API, refer to [Create a Cloud project and enable the API](/workspace/guides/create-project).\n- Publish the add-on on Google Workspace Marketplace. To publish an add-on on the Marketplace, refer to [Publish an app](/workspace/marketplace/how-to-publish).\n\nQuery add-on error logs\n\nTo get logs for an add-on:\n\n1. Open the [Google Cloud console](https://console.cloud.google.com/).\n2. Next to \"Google Cloud Platform,\" click the Down arrow arrow_drop_down and select the add-on project.\n3. In the top-left corner, click Menu menu \\\u003e **Logging**. The Logs Explorer opens.\n4. For add-on error logs, in the query builder, enter\n the following query:\n\n severity\u003e=ERROR\n protoPayload.serviceName=\"gsuiteaddons.googleapis.com\"\n\n5. To see recent errors, click **Run query** . Or, to see errors as they\n occur, click **Stream logs**. Add-ons error logs appear in the\n \"Query results\" pane.\n\nFor further information about Cloud Logs Explorer and writing queries, refer to\nthe following:\n\n- [Use the Logs Explorer](https://cloud.google.com/logging/docs/view/logs-viewer-interface)\n- [Build queries](https://cloud.google.com/logging/docs/view/building-queries)\n\nEnable or disable error logging\n\nBy default, error logging is enabled. When error logging is enabled, the\n[manifest file](/workspace/add-ons/concepts/workspace-manifests)\nhas the following: \n\n \"exceptionLogging\": \"STACKDRIVER\",\n\nTo disable error logging, replace\n`\"exceptionLogging\": \"STACKDRIVER\",` with the following line in the\nmanifest file: \n\n // Disable error logging\n \"exceptionLogging\": \"NONE\"\n\nTo re-enable error logging, replace `\"exceptionLogging\": \"NONE\"` with\n`\"exceptionLogging\": \"STACKDRIVER\",`.\n\nConsiderations\n\nAs you work with add-on error logs in Cloud Logs\nExplorer, take note of these considerations:\n\n- Add-ons only log errors in Logs Explorer. Other log types are not recorded.\n- Error messages are always written in English.\n- Cloud Logging incurs a cost. For further information about Cloud Logging pricing, refer to [Google Cloud Observability pricing](https://cloud.google.com/stackdriver/pricing)."]]