您可以設定應用程式,讓應用程式收集特定應用程式資訊。您可以使用多個開放原始碼檢測架構,從應用程式收集指標、記錄和追蹤記錄,並將這些資料傳送給任何供應商,包括 Google Cloud。如要檢測應用程式,建議您使用開放原始碼的供應商中立檢測架構,例如 OpenTelemetry,而非供應商和產品專屬的 API 或用戶端程式庫。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Client libraries\n\n| **Note:** Trace data is automatically captured for some configurations and for some Google Cloud services, so you might not need to instrument your application. For more information, see [Configurations with automatic tracing](/trace/docs/overview#configurations_with_automatic_tracing).\n\nWhen trace data isn't automatically captured, you need to instrument\nyour application to collect this data.\n\n\nYou can instrument your application so that it collects\napplication-specific information. Several open-source\ninstrumentation frameworks let you collect metrics, logs, and\ntraces from your application and send that data to any vendor,\nincluding Google Cloud. To instrument your application, we recommend that you use a\nvendor-neutral instrumentation framework that is open source, such as\n[OpenTelemetry](https://opentelemetry.io/), instead of\nvendor- and product-specific APIs or client libraries.\n\nFor information about instrumenting your applications by using\nvendor-neutral instrumentation frameworks, see\n[Instrumentation and observability](/stackdriver/docs/instrumentation/overview).\n\nSet up information for the OpenTelemetry library:\n\n- [C++](/trace/docs/setup/cpp-ot)\n- [Go](/trace/docs/setup/go-ot)\n- [Java](/trace/docs/setup/java-ot)\n- [Node.js](/trace/docs/setup/nodejs-ot)\n- [Python](/trace/docs/setup/python-ot)\n\nInformation about the Cloud Client Libraries:\n\n- Ruby:\n\n | **Note:** We recommend that you use OpenTelemetry for Ruby. For more information, see the [Ruby SDK](https://opentelemetry.io/docs/instrumentation/ruby/).\n\n GitHub: [`googleapis/google-cloud-trace`](https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-trace)\n- ASP.NET:\n\n - Library: [`Google.Cloud.Diagnostics.AspNet`](https://googleapis.dev/dotnet/Google.Cloud.Diagnostics.AspNet/latest/index.html)\n - NuGet package: [`Google.Cloud.Diagnostics.AspNet`](https://www.nuget.org/packages/Google.Cloud.Diagnostics.AspNet/)\n - GitHub: [`Google.Cloud.Diagnostics.AspNet version 4.0.0`](https://github.com/googleapis/google-cloud-dotnet/releases/tag/Google.Cloud.Diagnostics.AspNet-4.0.0)\n- ASP.NET Core:\n\n - Libraries: [`Google.Cloud.Diagnostics.AspNetCore3`](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/latest) and [`Google.Cloud.Diagnostics.AspNetCore`](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest)\n - NuGet packages: [`Google.Cloud.Diagnostics.AspNetCore3`](https://www.nuget.org/packages/Google.Cloud.Diagnostics.AspNetCore3/) and [`Google.Cloud.Diagnostics.AspNetCore`](https://www.nuget.org/packages/Google.Cloud.Diagnostics.AspNetCore/)\n - GitHub: [`googleapis/google-cloud-dotnet`](https://github.com/googleapis/google-cloud-dotnet)"]]