Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Observabilidade e depuração com o Diretório de serviços
A integração do Cloud Service Mesh com o Diretório de serviços introduz novas
complexidades na depuração. Na sua empresa, os consumidores e os produtores de serviços podem pertencer a equipes ou organizações diferentes. Para ajudar a depurar esses problemas, o Cloud Service Mesh se integra ao Cloud Logging e
ao Cloud Monitoring.
Exemplo:
Você tem um serviço checkout que usa o Cloud Service Mesh para
rede de aplicativos.
Há um serviço payment no Diretório de serviços que pertence a outra equipe
(o produtor) e mantém.
Você quer chamar no serviço payment do serviço checkout para
criar um novo serviço de back-end no Cloud Service Mesh. Esse serviço de back-end
é anexado ao serviço payment usando o Diretório de serviços para
descoberta de serviços.
Nesse modelo, o fornecedor de serviços pode querer excluir ou modificar o serviço payment hospedado no Diretório de serviços. Como eles são proprietários
do serviço payment, podem fazer essas mudanças. Mas se o serviço payment for excluído, a descoberta de serviço será interrompida.
Logging
Quando o Cloud Service Mesh resolve um serviço de back-end anexado a um
serviço do Diretório de serviços, ele recebe uma lista de endpoints do
Diretório de serviços. Se o serviço tiver sido excluído do
Diretório de serviços, o Cloud Service Mesh não receberá endpoints.
Nesse caso, uma entrada de registro é adicionada ao Logging. A entrada
de registro inclui as informações a seguir:
O nome do serviço de back-end
O nome do Diretório de serviços
Uma mensagem: Service Directory returned 0 endpoints for this service.
Essas informações ajudam a depurar problemas. Você também pode configurar alertas
para receber notificações proativamente.
Monitoramento
Semelhante ao caso de geração de registros, o Cloud Service Mesh se integra
ao Monitoring para gerar métricas. O Cloud Service Mesh adiciona as
seguintes métricas ao Monitoring para cada serviço de back-end:
O nome do serviço de back-end
O número de endpoints associados a este serviço de back-end
compartilhados com os clientes do Cloud Service Mesh
Os clientes do Cloud Service Mesh não podem enviar tráfego para serviços de back-end que
não têm endpoints.
Google Cloud console
Se um serviço do Diretório de serviços for excluído e houver um anexo
nesse serviço no serviço de back-end do Cloud Service Mesh, o
consoleGoogle Cloud vai mostrar um aviso: The attached
Service Directory service could not be found.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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/v1.24/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/v1.24/docs/service-routing/service-directory-integration).\n- Learn how to [set up the integration](/service-mesh/v1.24/docs/service-routing/service-directory-integration-setup).\n- Learn about [Service Directory observability](/service-directory/docs/monitoring)."]]