שאילתת נתוני מעקב באמצעות BigQuery Studio

במאמר הזה מוסבר איך לשלוח שאילתות לנתוני העקבות מ-BigQuery Studio. כשמשתמשים ב-BigQuery Studio, אפשר לצרף את נתוני העקבות לנתונים עסקיים אחרים.

כדי להתחיל להשתמש ב-Observability Analytics, אפשר לעיין במאמר שאילתות וניתוח של נתוני מעקב.

לפני שמתחילים

  1. נכנסים לחשבון Google Cloud . אם אתם משתמשים חדשים ב- Google Cloud, צרו חשבון כדי שתוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Cloud Monitoring and Observability APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Cloud Monitoring and Observability APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  8. כדי לקבל את ההרשאות שנדרשות להרצת שאילתות במערך נתונים מקושר מ-BigQuery, צריך לבקש מהאדמין להעניק לכם את תפקיד ה-IAM‏ BigQuery Data Viewer (roles/bigquery.dataViewer) בפרויקט או במערך הנתונים המקושר. כדי לקרוא הסבר על מתן תפקידים, ראו איך מנהלים את הגישה ברמת הפרויקט, התיקייה והארגון.

    יכול להיות שאפשר לקבל את ההרשאות הנדרשות גם באמצעות תפקידים בהתאמה אישית או תפקידים מוגדרים מראש.

  9. מוודאים שמערך הנתונים המקושר ב-BigQuery עבור מאגר התצפיות שנקרא _Trace קיים. אם מערך הנתונים המקושר ב-BigQuery לא קיים, צריך ליצור אותו.

הרצת שאילתות ב-BigQuery Studio

כדי לפתוח את BigQuery מדף Observability Analytics ואז להריץ שאילתות על נתוני המעקב:

  1. נכנסים לדף Observability Analytics במסוף Google Cloud :

    עוברים אל Observability Analytics

    אם משתמשים בסרגל החיפוש כדי למצוא את הדף הזה, בוחרים בתוצאה שכותרת המשנה שלה היא Logging.

  2. מזינים או טוענים שאילתה. מידע נוסף זמין במאמר שאילתות וניתוח של עקבות.

  3. בסרגל הכלים, מרחיבים את התפריט עם התווית Run query או Run on BigQuery ובוחרים באפשרות Open in BigQuery.

    ייפתח BigQuery Studio. בדף הזה, ההצהרה FROM מציינת את מערך הנתונים המקושר באמצעות תחביר של נתיב טבלה ב-BigQuery. אפשר לבצע על השאילתה כל פעולה נתמכת, כמו עריכה.

    אם האפשרות פתיחה ב-BigQuery מושבתת, סימן שמערך הנתונים המקושר לא קיים או שאין לכם את ההרשאות הנדרשות לפתיחה ולצפייה בשאילתה ב-BigQuery.

  4. ב-BigQuery Studio, לוחצים על Run query (הרצת השאילתה).

תמחור

מידע על העלויות שקשורות לשימוש ב-BigQuery זמין במאמר בנושא תמחור ב-BigQuery.

המאמרים הבאים