Cloud Service Mesh dan Traffic Director kini bergabung menjadi Cloud Service Mesh. Untuk mengetahui informasi selengkapnya, lihat ringkasan Cloud Service Mesh.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Kemampuan observasi dan penelusuran bug dengan Service Directory
Integrasi Cloud Service Mesh dengan Service Directory menimbulkan kompleksitas baru dalam proses penelusuran bug. Dalam bisnis Anda, konsumen layanan dan produsen layanan mungkin berasal dari tim atau organisasi yang berbeda. Untuk membantu Anda men-debug masalah tersebut, Cloud Service Mesh terintegrasi dengan Cloud Logging dan Cloud Monitoring.
Contoh:
Anda memiliki layanan checkout yang menggunakan Cloud Service Mesh untuk
jaringan aplikasi.
Ada layanan payment di Service Directory yang dimiliki dan dikelola oleh tim lain (produsen layanan).
Anda ingin memanggil layanan payment dari layanan checkout, jadi
Anda membuat layanan backend baru di Cloud Service Mesh. Layanan backend ini terhubung ke layanan payment menggunakan Service Directory untuk penemuan layanan.
Dalam model ini, produsen layanan mungkin ingin menghapus atau mengubah layanan paymentyang dihosting di Service Directory. Karena memiliki layanan payment, mereka diizinkan untuk melakukan perubahan tersebut. Namun, jika layanan
payment dihapus, penemuan layanan akan terganggu.
Logging
Saat me-resolve layanan backend yang dilampirkan ke layanan Service Directory, Cloud Service Mesh akan mendapatkan daftar endpoint dari Service Directory. Jika layanan telah dihapus dari
Service Directory, Cloud Service Mesh tidak akan mendapatkan endpoint apa pun.
Dalam kasus seperti itu, entri log ditambahkan ke Logging. Entri log
mencakup informasi berikut:
Nama layanan backend
Nama Service Directory
Pesan: Service Directory returned 0 endpoints for this service.
Informasi ini membantu Anda men-debug masalah. Anda juga dapat menyiapkan notifikasi agar mendapatkan pemberitahuan secara proaktif.
Pemantauan
Mirip dengan kasus logging, Cloud Service Mesh terintegrasi dengan
Monitoring untuk membuat metrik. Cloud Service Mesh menambahkan metrik berikut ke Monitoring untuk setiap layanan backend:
Nama layanan backend
Jumlah endpoint yang terkait dengan layanan backend ini yang dibagikan dengan klien Cloud Service Mesh
Klien Cloud Service Mesh tidak dapat mengirim traffic ke layanan backend yang tidak memiliki endpoint.
Google Cloud console
Jika layanan Service Directory dihapus dan lampiran ke layanan tersebut ada di layanan backend Cloud Service Mesh, konsolGoogle Cloud akan menampilkan peringatan: The attached
Service Directory service could not be found.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Observability and debugging with Service Directory\n==================================================\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Deprecated:** Cloud Service Mesh's integration with Service Directory is going to be deprecated. Creating new service binding resources will be disabled.\n\nCloud Service Mesh's integration with Service Directory introduces new\ncomplexities in debugging. Within your business, service consumers and\nservice producers might belong to different teams or organizations. To help you\ndebug such issues, Cloud Service Mesh integrates with Cloud Logging and\nCloud Monitoring.\n\nFor example:\n\n- You have a `checkout` service that uses Cloud Service Mesh for application networking.\n- There's a `payment` service in Service Directory that a different team (the *service producer*) owns and maintains.\n- You want to call on the `payment` service from the `checkout` service so you create a new backend service in Cloud Service Mesh. This backend service attaches to the `payment` service using Service Directory for service discovery.\n\nIn this model, the service producer might want to delete or modify the `payment`service that is hosted in Service Directory. Because they own\nthe `payment` service, they are permitted to make such changes. But if the\n`payment` service is deleted, service discovery is broken.\n| **Note:** This guide only supports Cloud Service Mesh with Google Cloud APIs and does not support Istio APIs. For more information see, [Cloud Service Mesh overview](/service-mesh/docs/overview).\n\nLogging\n-------\n\nWhen Cloud Service Mesh resolves a backend service that is attached to a\nService Directory service, it gets a list of endpoints from\nService Directory. If the service has been deleted from\nService Directory, Cloud Service Mesh doesn't get any endpoints.\nIn such a case, a log entry is added to Logging. The log entry\nincludes the following information:\n\n- The backend service name\n- The Service Directory name\n- A message: `Service Directory returned 0 endpoints for this service.`\n\nThis information helps you debug issues. You can also set up alerts to be\nproactively notified.\n\nMonitoring\n----------\n\nSimilar to the logging case, Cloud Service Mesh integrates with\nMonitoring to generate metrics. Cloud Service Mesh adds the\nfollowing metrics to Monitoring for each backend service:\n\n- The backend service name\n- The number of endpoints associated with this backend service that are shared with Cloud Service Mesh's clients\n\nCloud Service Mesh clients are not able to send traffic to backend services that\ndon't have endpoints.\n\nGoogle Cloud console\n--------------------\n\nIf a Service Directory service is deleted and an attachment to\nthat service exists in the Cloud Service Mesh backend service, the\nGoogle Cloud console displays a warning: `The attached\nService Directory service could not be found.`\n\nWhat's next\n-----------\n\n- Learn about [integrating Cloud Service Mesh with Service Directory](/service-mesh/docs/service-routing/service-directory-integration).\n- Learn how to [set up the integration](/service-mesh/docs/service-routing/service-directory-integration-setup).\n- Learn about [Service Directory observability](/service-directory/docs/monitoring)."]]