Cloud Service Mesh와 서비스 디렉터리의 통합으로 디버깅이 더욱 복잡해졌습니다. 비즈니스 내에서 서비스 소비자와 서비스 프로듀서가 서로 다른 팀 또는 조직에 속할 수 있습니다. 이러한 문제를 디버깅하기 위해 Cloud Service Mesh는 Cloud Logging 및 Cloud Monitoring과 통합됩니다.
예를 들면 다음과 같습니다.
애플리케이션 네트워킹에 Cloud Service Mesh를 사용하는 checkout 서비스가 있습니다.
서비스 디렉터리에는 다른 팀(서비스 제작자)이 소유하고 유지 관리하는 payment 서비스가 있습니다.
Cloud Service Mesh에서 새 백엔드 서비스를 만들 수 있도록 checkout 서비스에서 payment 서비스를 호출하려고 합니다. 이 백엔드 서비스는 서비스 검색을 위해 서비스 디렉터리를 사용하여 payment 서비스에 연결됩니다.
이 모델에서 서비스 프로듀서는 서비스 디렉터리에 호스팅되는 payment 서비스를 삭제하거나 수정해야 할 수 있습니다. payment 서비스를 소유하고 있으므로 이러한 항목을 변경하도록 허용합니다. 하지만 payment 서비스가 삭제되면 서비스 검색이 중단됩니다.
로깅
Cloud Service Mesh는 서비스 디렉터리 서비스에 연결된 백엔드 서비스를 확인할 때 서비스 디렉터리에서 엔드포인트 목록을 가져옵니다. 서비스가 서비스 디렉터리에서 삭제된 경우 Cloud Service Mesh가 엔드포인트를 가져오지 않습니다.
이 경우 로그 항목이 Logging에 추가됩니다. 로그 항목에는 다음 정보가 포함됩니다.
백엔드 서비스 이름
서비스 디렉터리 이름
메시지: Service Directory returned 0 endpoints for this service.
이 정보는 문제를 디버깅하는 데 도움이 됩니다. 또한 사전 알림을 받도록 알림을 설정할 수도 있습니다.
모니터링
Logging 사례와 같이 Cloud Service Mesh는 Monitoring과도 통합되어 측정항목을 생성합니다. Cloud Service Mesh는 Monitoring에 각 백엔드 서비스에 대한 다음 측정항목을 추가합니다.
백엔드 서비스 이름
Cloud Service Mesh의 클라이언트와 공유하는 백엔드 서비스와 연결된 엔드포인트 수
Cloud Service Mesh 클라이언트는 엔드포인트가 없는 백엔드 서비스로 트래픽을 전송할 수 없습니다.
Google Cloud 콘솔
서비스 디렉터리 서비스가 삭제되었는데 해당 서비스에 대한 연결이 Cloud Service Mesh 백엔드 서비스에 존재하면 Google Cloud 콘솔에 The attached
Service Directory service could not be found. 경고가 표시됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 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\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/v1.22/docs/service-routing/service-directory-integration).\n- Learn how to [set up the integration](/service-mesh/v1.22/docs/service-routing/service-directory-integration-setup).\n- Learn about [Service Directory observability](/service-directory/docs/monitoring)."]]