Google Cloud용 분산 추적 시스템인 Cloud Trace를 사용하면 애플리케이션이 사용자 또는 다른 애플리케이션으로부터 들어오는 요청을 처리하는 데 걸리는 시간과 요청 처리 시 수행된 RPC 호출과 같은 작업을 완료하는 데 걸리는 시간을 파악할 수 있습니다.
Trace는 서비스를 개발하거나 오류를 해결할 때도 도움이 됩니다. 예를 들어 복잡한 마이크로서비스 아키텍처에서 요청이 처리되는 방식을 이해하고 어떤 로그를 검사할지 식별하는 데 도움이 됩니다.
Trace는 App Engine과 같은 일부 서비스와 Cloud Trace API로 계측한 애플리케이션에서 지연 시간 데이터를 수신하므로 다음 질문의 답을 찾을 수 있습니다. Google Cloud
Trace는 trace 정보를 캡처하기 위해 애플리케이션 계측용 클라이언트 라이브러리를 제공합니다. 언어별 설정 안내는 Trace 계측을 참고하세요.
자동 trace를 사용하는 구성
일부 구성에서는 trace 데이터가 자동으로 캡처됩니다.
App Engine 표준 환경
Java 8, Python 2, PHP 5 애플리케이션은 Trace 클라이언트 라이브러리를 사용할 필요가 없습니다. 이러한 런타임은 애플리케이션 URI에 대한 요청의 지연 시간 데이터를 Trace에 자동으로 전송합니다.
요청에는 App Engine 서비스에 대한 왕복 RPC 호출의 지연 시간 데이터가 포함됩니다. Trace는 Cloud SQL을 제외한 모든 App Engine Admin API에서 작동합니다.
Cloud Run Functions 및 Cloud Run
수신 및 발신 HTTP 요청의 경우 지연 시간 데이터가 Trace로 자동으로 전송됩니다.
언어 지원
다음 표에는 Trace 클라이언트 라이브러리와 Trace로의 내보내기가 있는 OpenTelemetry 라이브러리의 가용성이 요약되어 있습니다.
OpenTelemetry 라이브러리는 해당 Trace API의 일부 복잡한 내용을 표시하지 않으므로 Trace 클라이언트 라이브러리보다 쉽게 사용할 수 있습니다. 계측 권장사항은 계측 방법 선택을 참조하세요.
구성요소
Trace는 trace를 수집하여 Google Cloud 프로젝트로 전송하는 추적 클라이언트로 구성됩니다. 그런 다음Google Cloud 콘솔을 사용하여 에이전트가 수집한 데이터를 보고 분석할 수 있습니다.
데이터 모델에 대한 자세한 내용은 trace 및 스팬을 참고하세요.
추적 클라이언트
OpenTelemetry 라이브러리를 프로그래밍 언어에서 사용할 수 있는 경우 OpenTelemetry를 사용하여 trace 데이터를 만들고 보내는 프로세스를 간소화할 수 있습니다.
OpenTelemetry는 사용이 간편할 뿐만 아니라 일괄 처리를 구현하여 성능을 개선할 수 있습니다.
OpenTelemetry 라이브러리가 없으면 trace SDK 라이브러리를 가져오고 Cloud Trace API를 사용해서 코드를 계측합니다.
Cloud Trace API는 trace 데이터를 Google Cloud 프로젝트로 전송합니다.
추적 인터페이스
Trace 인터페이스에서 거의 실시간으로 trace 데이터를 보고 분석할 수 있습니다.
trace 탐색기 페이지에는 trace 데이터에 관한 집계 정보가 표시되며 개별 trace를 자세히 살펴볼 수 있습니다. 집계된 지연 시간 데이터는 히트맵에 표시되며, 포인터를 사용하여 탐색할 수 있습니다. 표시되는 데이터를 제한하려면 필터를 추가합니다. 이 페이지에서는 개별 스팬과 트레이스를 확인하고 탐색할 수도 있습니다.
여러 프로젝트에 저장된 트레이스 데이터를 보는 방법에 대한 자세한 내용은 트레이스 범위 만들기 및 관리를 참고하세요.
trace 데이터 필터링 및 보기에 대한 자세한 내용은 trace 찾기 및 탐색을 참고하세요.
VPC 서비스 제어 지원
Trace는 VPC 서비스 제어 지원 서비스입니다. 추적 서비스 이름은 cloudtrace.googleapis.com입니다. Trace 서비스에 대해 생성한 VPC 서비스 제어 제한사항은 해당 서비스에만 적용됩니다. 이러한 제한은 trace 데이터를 수집할 수 있는 telemetry.googleapis.com 서비스와 같은 다른 서비스에는 적용되지 않습니다.
[[["이해하기 쉬움","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-08-19(UTC)"],[],[],null,["Cloud Trace, a distributed tracing system for\nGoogle Cloud, helps you\nunderstand how long it takes your application to handle incoming\nrequests from users or other applications, and how long it takes to complete\noperations like RPC calls performed when handling the requests.\nTrace can also help you when you are developing a service or\ntroubleshooting a failure. For example, it can help you understand how requests\nare processed in a complicated microservices architecture, and it might help\nyou identify which logs to examine.\n\nBecause Trace receives latency data from some Google Cloud\nservices, such as [App Engine](/appengine/docs), and from\napplications instrumented with the [Cloud Trace API](/trace/api),\nit can help you answer the following questions:\n\n- How long does it take my application to handle a given request?\n- Why is it taking my application so long to handle a request?\n- Why do some of my requests take longer than others?\n- What is the overall latency of requests to my application?\n- Has latency for my application increased or decreased over time?\n- What can I do to reduce application latency?\n- What are my application's dependencies?\n\nIf you're curious about how you can use Trace to help you manage\nyour applications, then read the blog\n[Troubleshooting distributed applications: Using traces and logs together for root-cause analysis](https://cloud.google.com/blog/products/devops-sre/using-cloud-trace-and-cloud-logging-for-root-cause-analysis).\n\nFor information about profiling your application,\nsee [Cloud Profiler](/profiler).\n\nEnvironment support\n\nTrace runs on Linux in the following environments:\n\n- [Compute Engine](/compute/docs)\n- [Google Kubernetes Engine (GKE)](/kubernetes-engine/docs)\n- [Apigee](/apigee/docs/api-platform/develop/enabling-distributed-trace) (Public Preview)\n- [App Engine flexible environment](/appengine/docs/flexible)\n- [App Engine standard environment](/appengine/docs/standard)\n- [Cloud Run](/run/docs/trace)\n- [Cloud Service Mesh](/service-mesh/docs/observability/accessing-traces)\n- [Cloud SQL query insights](/sql/docs/mysql/using-query-insights)\n- Non-Google Cloud environments\n\nTrace provides client libraries for instrumenting your\napplication to capture trace information. For per-language setup instructions,\nsee [Instrument for Trace](/trace/docs/setup).\n\nConfigurations with automatic tracing\n\nSome configurations result in automatic capture of trace data:\n\n- App Engine standard environment\n\n Java 8, Python 2, and PHP 5 applications don't need to use the\n Trace client libraries. These runtimes automatically send\n latency data to Trace for requests to application URIs.\n The requests include latency data for round-trip RPC calls to\n App Engine services. Trace works with all\n App Engine Admin APIs, with the exception of Cloud SQL.\n- Cloud Run functions and Cloud Run\n\n For incoming and outgoing HTTP requests, latency data is automatically\n sent to Trace.\n\nLanguage support **Note:** You can instrument your application so that it collects application-specific information. Several open-source instrumentation frameworks let you collect metrics, logs, and traces from your application and send that data to any vendor, including Google Cloud. To instrument your application, we recommend that you use a vendor-neutral instrumentation framework that is open source, such as [OpenTelemetry](https://opentelemetry.io/), instead of vendor- and product-specific APIs or client libraries.\n|\n| \u003cbr /\u003e\n|\n| For information about instrumenting your applications by using\n| vendor-neutral instrumentation frameworks, see\n| [Instrumentation and observability](/stackdriver/docs/instrumentation/overview).\n\nThe following table summarizes the availability of Trace\nclient libraries and of [OpenTelemetry](https://opentelemetry.io/)\nlibraries for which there is an exporter to Trace.\n\n| Language | Client library available | OpenTelemetry lib/exporter available |\n|-----------------------------------------------|--------------------------|--------------------------------------|\n| [C++](/trace/docs/setup/cpp-ot) | Yes | Yes |\n| C# ASP.NET Core | Yes | No |\n| C# ASP.NET | Yes | No |\n| [Go](/trace/docs/setup/go-ot) | Yes | Yes |\n| [Java](/trace/docs/setup/java-ot) | Yes | Yes |\n| [Node.js](/trace/docs/setup/nodejs-ot) | Yes | Yes |\n| [PHP](/php/docs/reference/cloud-trace/latest) | Yes | No |\n| [Python](/trace/docs/setup/python-ot) | Yes | Yes |\n| Ruby | Yes | Yes |\n\n[OpenTelemetry](https://opentelemetry.io/)\nlibraries are simpler to use than the Trace client libraries\nbecause they hide some of the complexity of the corresponding\nTrace API. For instrumentation recommendations, see\n[Choose an instrumentation approach](/stackdriver/docs/instrumentation/choose-approach).\n\nComponents\n\nTrace consists of a tracing client, which collects *traces* and\nsends them to your Google Cloud project. You can then use the\nGoogle Cloud console to view and analyze the data collected by the agent.\nFor information about the data model, see\n[Traces and spans](/trace/docs/traces-and-spans).\n\nTracing client\n\nIf an OpenTelemetry library is [available for your programming\nlanguage](#language_support), you can simplify the process of creating and\nsending trace data by using\n[OpenTelemetry](https://opentelemetry.io/).\nIn addition to being simpler to use, OpenTelemetry\nimplements batching which might improve performance.\n\nIf an OpenTelemetry library doesn't exist, then instrument your code by\nimporting the Trace SDK library and by using the Cloud Trace API.\nThe Cloud Trace API sends trace data to your Google Cloud project.\n\nTracing interface\n\nYou can view and analyze your trace data\nin near real-time in the Trace interface.\n\nThe **Trace Explorer** page displays aggregate information about\nyour trace data and lets you examine individual\ntraces in detail. The aggregated latency data is shown on a heatmap, which\nyou can explore with your pointer. To restrict which data is displayed, you\ncan add filters. This page also lets you view and explore individual spans and\ntraces:\n\n- For information about how to view trace data stored in multiple projects, see [Create and manage trace scope](/trace/docs/trace-scope/create-and-manage).\n- For information about filtering and viewing your trace data, see [Find and explore traces](/trace/docs/finding-traces).\n\nVPC Service Controls support\n\nTrace is a VPC Service Controls supported service. The\nTrace service name is `cloudtrace.googleapis.com`. Any\nVPC Service Controls restrictions that you create for the\nTrace service apply only to that service. Those restrictions\ndon't apply to any other services, including those like the\n[`telemetry.googleapis.com` service](/stackdriver/docs/reference/telemetry/overview),\nwhich can also ingest trace data.\n\nFor more information, see the following:\n\n- [VPC Service Controls documentation](/vpc-service-controls/docs).\n- [Supported products and limitations](/vpc-service-controls/docs/supported-products).\n\nPricing\n\nTo learn about pricing for Cloud Trace, see the [Google Cloud Observability pricing](https://cloud.google.com/stackdriver/pricing) page.\n\nWhat's next\n\n- Try the [Quickstart](/trace/docs/trace-app-latency).\n\n- For information about quotas and limits, see\n [Quotas and limits](/trace/docs/quotas).\n\n- Read our resources about [DevOps](/devops) and explore the\n [DevOps Research and Assessment](https://dora.dev/) research program."]]