Cloud Logging را تنظیم کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Cloud Logging را فعال کنید
Fleet Engine باید به طور خودکار ورود به سیستم را فعال کند.
- Logs Explorer را باز کنید.
پرس و جو زیر را وارد کنید:
resource.type:"fleetengine.googleapis.com"
اگر نتایج مربوط به لیست پرس و جو ثبت شود، ورود به سیستم فعال است.
اگر هیچ گزارشی را در نتایج این عبارت جستجو نمیبینید، ممکن است Cloud Logging برای پروژه شما فعال نباشد. برای فعال کردن Cloud Logging، با پشتیبانی پلتفرم Google Maps تماس بگیرید.
گزارشهای استفاده محدود را فعال کنید
مطابق با شرایط خاص سرویس Mobility ، برخی از دادههای گزارشی که Fleet Engine ایجاد میکند ممکن است فقط به مدت 30 روز حفظ شود. Fleet Engine آن لاگها را به عنوان TOS_RESTRICTED
برچسبگذاری میکند و آنها را در یک سطل گزارش با حفظ محدود طبقهبندی میکند، که باید مطابق شکل زیر ایجاد کنید.
تمام دادههای گزارش دیگر به سطل پیشفرض اختصاص داده میشوند، جایی که میتوان آنها را برای مدت طولانیتری نگه داشت، همانطور که در شرایط خاص سرویس تحرک تعریف شده است. در مورد سفارشیسازی سطلهای گزارش و دورههای نگهداری آنها، Logs Storage را در Google Cloud Console ببینید.
برای تجزیه و تحلیل، میتوانید دادهها را از لاگهای محدود و پیشفرض برای مجموعه کاملی از دادههای گزارش بپیوندید.
برای فعال کردن گزارشهای استفاده محدود، موارد زیر را انجام دهید:
یک سینک و سطل برای سیاهههای مربوط به استفاده محدود ایجاد کنید و سیاههها را در سطلهای مناسب آنها فیلتر کنید.
برای فعال کردن گزارشهای استفاده محدود با پشتیبانی تماس بگیرید.
برای جزئیات، بخش های زیر را ببینید.
یک سینک و سطل برای سیاهههای مربوط به پروژه خود ایجاد کنید
در Logs Explorer ، در ناوبری سمت چپ، صفحه Log Router را باز کنید.
سطل ثبت نام _Default را تغییر دهید تا گزارشهای استفاده محدود را حذف کنید.
- در زیر Log Router Sinks ، سطل _Default logging را انتخاب کنید.
- از منوی Actions گزینه Edit sink را انتخاب کنید.
- به بخش Choose logs to filter out of sink رفته و روی دکمه Add Exclusion کلیک کنید.
- نام فیلتر Exclusion را روی ExcludeRestrictedLogs تنظیم کنید.
- در کادر فیلتر ساخت و حذف ، این فیلتر را جایگذاری کنید:
labels.restriction="TOS_RESTRICTED"
- روی Update sink کلیک کنید.
یک سطل ورود به سیستم محدود برای ذخیره گزارشهای استفاده محدود ایجاد کنید. شما این کار را با ایجاد یک سینک و سطل برای همه سیاههها و سپس حذف لاگهای غیرمحدود انجام میدهید.
- در صفحه Log Router ، به سمت بالا، Create sink را انتخاب کنید.
- مشخصات سینک را پر کنید:
- نام: RestrictedLogs
- توضیحات: سیاهههای مربوط به استفاده محدود Routes Fleet Engine.
- روی Next کلیک کنید.
- مقصد سینک را پر کنید:
- سرویس سینک: سطل ورود به سیستم را انتخاب کنید
- انتخاب سطل گزارش: ایجاد سطل گزارش جدید را انتخاب کنید.
- در گفتگوی جزئیات سطل ، موارد زیر را پر کنید:
- نام: محدود
- توضیحات: شامل سیاهههای مربوط به استفاده محدود از موتور ناوگان است.
- بقیه را همانطور که هست بگذارید و روی Next کلیک کنید.
- مدت زمان نگهداری را روی 30 روز تنظیم کنید. (مدت نگهداری نباید بیش از 30 روز باشد.)
- روی ایجاد سطل کلیک کنید.
- در گفتگوی ایجاد سینک، Logs را خالی بگذارید تا در بخش سینک گنجانده شود .
- در بخش Logs to filter out of sink ، روی Add Exclusion کلیک کنید و آن را پر کنید:
- نام فیلتر حذف: ExcludeNonRestrictedLogs
- فیلتر حذف:
NOT (resource.type = "fleetengine.googleapis.com/Fleet" OR resource.type = "fleetengine.googleapis.com/DeliveryFleet") NOT (labels.restriction = "TOS_RESTRICTED")
- روی ایجاد سینک کلیک کنید.
- به پشتیبانی پلتفرم Google Maps بروید
- برای شروع درخواست پشتیبانی جدید، روی Create Case کلیک کنید.
اطلاعات زیر را ارائه دهید:
- شناسه(های) پروژه برای فعال کردن.
- آدرس ایمیل شخصی که درخواست تغییر می کند. این شخص باید به پروژههای Google Cloud که فهرست کردهاید دسترسی ویرایش داشته باشد.
با نوشتن بله ، با موارد زیر موافقت کنید: با فعال کردن محتوای Google Maps با استفاده محدود در گزارش ابری، موافقت میکنید که به شرایط پلتفرم Google Maps و شرایط خاص سرویس Mobility ، از جمله الزامات ذخیرهسازی پنهان و استفاده مجاز در ارتباط با محتوای Google Maps پایبند باشید.
هنگامی که تیم پشتیبانی درخواست شما را رسیدگی کرد، تأییدیه ای دریافت خواهید کرد که ثبت گزارش برای پروژه شما فعال شده است.
بعدش چی
نحوه کار با گزارشها را در Logs Explorer بیاموزید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eFleet Engine automatically enables logging, verifiable via a query in the Logs Explorer using \u003ccode\u003eresource.type:"fleetengine.googleapis.com"\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRestricted-use logs, labeled \u003ccode\u003eTOS_RESTRICTED\u003c/code\u003e, require a dedicated bucket with a 30-day retention period due to the Mobility Service Specific Terms.\u003c/p\u003e\n"],["\u003cp\u003eEnabling restricted-use logs involves creating a separate sink and bucket, then contacting Google Maps Platform Support for activation.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine logs may contain sensitive information and require careful access management using Google Cloud's Identity and Access Management for Cloud Logging.\u003c/p\u003e\n"]]],[],null,["Enable Cloud Logging\n\nFleet Engine should automatically have logging enabled.\n\n1. Open the [Logs Explorer](https://cloud.google.com/logging/docs/view/logs-explorer-interface).\n2. Enter the following query:\n\n resource.type:\"fleetengine.googleapis.com\"\n\nIf the results for the query list logs, then logging is enabled.\n\nIf you don't see any logs listed in the results for this query,\nCloud Logging may not be enabled for your project. To enable\nCloud Logging, contact [Google Maps Platform Support](https://console.cloud.google.com/google/maps-apis/support).\n\nEnable restricted use logs\n\nIn accordance with the [Mobility Service Specific Terms](/maps/documentation/transportation-logistics-terms/mobility/service-terms), some\nof the log data that Fleet Engine generates may only be retained for 30 days.\nFleet Engine labels those logs as `TOS_RESTRICTED` and sorts them into a\nrestricted-retention log bucket, which you must create as shown below.\n\nAll other log data is assigned to the default bucket where it can be retained\nlonger, as defined in the [Mobility Service Specific Terms](/maps/documentation/transportation-logistics-terms/mobility/service-terms).\nSee [Logs Storage](/maps/documentation/mobility/operations/cloud-logging/console.cloud.google.come/logs/storage) in the Google Cloud\nConsole about customizing your log buckets and their retention periods.\n\nFor analysis, you can join the data from restricted and default logs for a\ncomplete set of log data.\n\nDo the following to enable restricted use logs:\n\n1. Create a sink and bucket for restricted-use logs, and filter logs into their\n appropriate buckets.\n\n2. Contact support to enable restricted-use logs.\n\nFor details, see the following sections.\n\nCreate a sink and bucket for restricted logs in your project\n\n1. In the [Logs Explorer](https://cloud.google.com/logging/docs/view/logs-explorer-interface), in the left-hand\n navigation, open the **Log Router** page.\n\n2. Modify the _Default logging bucket to exclude restricted-use logs.\n\n 1. Under **Log Router Sinks**, select the _Default logging bucket.\n 2. Choose **Edit sink** from the **Actions** menu.\n 3. Go to the **Choose logs to filter out of sink** section and click the **Add Exclusion** button.\n 4. Set the **Exclusion filter name** to *ExcludeRestrictedLogs*.\n 5. In the **Build and exclusion filter** box, paste this filter: `labels.restriction=\"TOS_RESTRICTED\"`\n 6. Click **Update sink**.\n3. Create a restricted logging bucket to store the restricted-use logs. You do\n this by creating a sink and bucket for all logs, and then excluding the\n non-restricted logs.\n\n 1. On the [Log Router page](https://console.cloud.google.com/logs/router), towards the top, select **Create sink**.\n 2. Fill in the **Sink details** :\n 1. Name: *RestrictedLogs*\n 2. Description: *Routes Fleet Engine restricted-use logs.*\n 3. Click **Next**.\n 4. Fill in the **Sink destination** :\n 1. Select Sink service: Logging bucket\n 2. Select log bucket: Select **Create new log bucket**.\n 3. In the **Bucket details** dialog, fill in:\n 1. Name: *Restricted*\n 2. Description: *Contains Fleet Engine restricted-use logs.*\n 4. Leave the rest as is and click **Next**.\n 5. Set the **Retention period** to 30 days. (The retention period must not exceed 30 days.)\n 6. Click **Create bucket**.\n 5. Back in the sink creation dialog, leave the **Logs to include in sink** section empty.\n 6. In the **Logs to filter out of sink** section, click **Add Exclusion** and fill in:\n 1. Exclusion filter name: *ExcludeNonRestrictedLogs*\n 2. Exclusion filter: `NOT (resource.type =\n \"fleetengine.googleapis.com/Fleet\" OR resource.type =\n \"fleetengine.googleapis.com/DeliveryFleet\") NOT (labels.restriction\n = \"TOS_RESTRICTED\")`\n 7. Click **Create sink.**\n\nContact support to enable restricted-use logs\n\n1. Go to [Google Maps Platform Support](https://console.cloud.google.com/google/maps-apis/support)\n2. Click **Create Case** to start a new support request.\n3. Provide the following information:\n\n - Project ID(s) to enable.\n - Email address of the person requesting the change. This person should have edit access to the Google Cloud Projects you are listing.\n4. Agree to the following by writing **Yes** : *By enabling restricted-use\n Google Maps Content in Cloud Logging, you agree to adhere to the\n [Google Maps Platform terms](https://cloud.google.com/maps-platform/terms/) and [Mobility service specific\n terms](/maps/documentation/transportation-logistics-terms/mobility/service-terms), including caching and permitted use requirements as they relate\n to Google Maps Content.*\n\nOnce the support team handles your request, you will receive a confirmation that\nlogging has been enabled for your project.\n| **Note:** Fleet Engine logs may contain sensitive vehicle and trip information. You can restrict and audit access to these logs with Google Cloud [Identity and Access Management for Cloud Logging](https://cloud.google.com/logging/docs/access-control).\n\nWhat's next\n\nLearn how to [Work with logs in Logs Explorer](/maps/documentation/mobility/operations/cloud-logging/work-with-logs)."]]