Melihat latensi permintaan aplikasi
Pelajari cara mengumpulkan dan melihat data latensi dari aplikasi Anda:
Buat cluster Google Kubernetes Engine (GKE) menggunakan Google Cloud CLI.
Download dan deploy aplikasi contoh ke cluster Anda.
Buat trace dengan mengirim permintaan HTTP ke aplikasi contoh.
Lihat informasi latensi trace yang Anda buat.
Jalankan pembersihan.
Untuk mengikuti panduan langkah demi langkah untuk tugas ini langsung di Google Cloud konsol, klik Pandu saya:
Sebelum memulai
-
Batasan keamanan yang ditentukan oleh organisasi mungkin mencegah Anda menyelesaikan langkah-langkah berikut. Untuk mengetahui informasi pemecahan masalah, lihat Mengembangkan aplikasi di lingkungan yang terbatas. Google Cloud
- Login ke akun Anda. Google Cloud Jika Anda baru menggunakan Google Cloud, buat akun untuk mengevaluasi performa produk kami dalam skenario dunia nyata. Pelanggan baru juga mendapatkan kredit gratis senilai $300 untuk menjalankan, menguji, dan men-deploy workload.
-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Google Kubernetes Engine and Cloud Trace APIs.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Google Kubernetes Engine and Cloud Trace APIs.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
Peran yang diperlukan
Untuk mendapatkan izin yang diperlukan untuk membuat cluster Google Kubernetes Engine dan melihat rentang trace, minta administrator untuk memberi Anda peran IAM berikut di project Anda:
- Kubernetes Engine Admin (
roles/container.admin) - Cloud Trace User (
roles/cloudtrace.user) - Service Account User (
roles/iam.serviceAccountUser) - Service Usage Admin (
roles/serviceusage.serviceUsageAdmin)
Untuk mengetahui informasi selengkapnya tentang pemberian peran, lihat Mengelola akses ke project, folder, dan organisasi.
Anda mungkin juga bisa mendapatkan izin yang diperlukan melalui peran khusus atau peran bawaan lainnya.
Membuat cluster GKE
Panduan ini membuat cluster GKE standar. Jika Anda menggunakan mode Autopilot untuk Google Kubernetes Engine atau jika Anda mengaktifkan Workload Identity Federation for GKE, Anda harus mengonfigurasi aplikasi untuk menggunakan Workload Identity Federation for GKE.
Di toolbar, klik terminal