Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini memberikan pengantar tentang rekaman aktivitas dan span.
Rekaman aktivitas mewakili satu operasi menyeluruh. Rekaman aktivitas terdiri dari
span, yang merupakan data untuk satu fungsi atau operasi.
Model data rekaman aktivitas
Rekaman aktivitas memiliki properti berikut:
Trace ID: ID unik operasi menyeluruh.
ID rekaman aktivitas harus
di-propagasi sebagai konteks sebagai bagian dari operasi menyeluruh.
Kumpulan span yang memiliki nilai yang sama untuk ID rekaman aktivitas.
Cloud Trace menggunakan ID rekaman aktivitas untuk mengidentifikasi span mana di repositorinya
yang terkait dengan rekaman aktivitas yang sama.
Model data span
Span sesuai dengan operasi yang berlangsung selama beberapa jangka waktu yang terbatas tetapi
bukan nol. Berikut adalah beberapa properti penting yang disimpan oleh setiap span:
ID Rekaman Aktivitas: ID operasi menyeluruh yang tempat
operasi keseluruhan tertentu ini berlangsung.
ID Span: ID unik untuk span. Jika operasi yang sama
dipanggil dalam fulfillment satu operasi keseluruhan beberapa kali,
trace mungkin berisi beberapa span dengan nama yang sama. Namun,
setiap span memiliki ID span yang berbeda.
ID span induk: Mengidentifikasi operasi yang memanggil span ini. Span
"root" memiliki ID span induk yang ditetapkan ke null.
Nama: Nama operasi yang dilakukan.
Start time: Waktu mulai operasi.
End time: Waktu berakhir operasi.
Span juga dapat berisi atribut, yang menyimpan informasi tambahan tentang operasi menggunakan pasangan nilai kunci. Cloud Trace merekomendasikan agar Anda menggunakan
Konvensi Semantik OpenTelemetry jika memungkinkan.
[[["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-08-19 UTC."],[],[],null,["# Traces and spans\n\nThis document provides an introduction to traces and spans.\nA *trace* represents a single end-to-end operation. Traces are composed of\n*spans*, which are records for a single function or operation.\n\nTrace data model\n----------------\n\nA trace has the following properties:\n\n- **Trace ID** : The unique identifier of the end-to-end operation.\n The trace ID must be\n propagated as [context](/trace/docs/trace-context) as part of the end-to-end operation.\n\n- A collection of spans that share the same value for the trace ID.\n\n Cloud Trace uses the trace ID to identify which spans in its repository\n are associated with the same trace.\n\nSpan data model\n---------------\n\nA span corresponds to an operation which took place over some finite but\nnon-zero time period. The following lists some essential properties stored\nby each span:\n\n- **Trace ID**: The identifier of the end-to-end operation in which this particular overall operation took place.\n- **Span ID**: The unique identifier for the span. If the same operation is invoked in the fulfillment of a single overall operation multiple times, then a trace might contain multiple spans with the same name. However, each span has a distinct span ID.\n- **Parent span ID** : Identifies the operation which invoked this span. The \"root\" span has the parent span ID set to `null`.\n- **Name**: The name of the operation that was performed.\n- **Start time**: The start time of the operation.\n- **End time**: The end time of the operation.\n\nSpans might also contain *attributes* , which store additional information about\nan operation by using key-value pairs. Cloud Trace recommends that you use\n[OpenTelemetry Semantic Conventions](https://github.com/open-telemetry/semantic-conventions) where possible.\n\nResources\n---------\n\nOpenTelemetry resources:\n\n- [OpenTelemetry](https://opentelemetry.io/)\n- [OpenTelemetry Trace overview](https://opentelemetry.io/docs/specs/otel/overview/#traces)\n- [OpenTelemetry Traces](https://opentelemetry.io/docs/concepts/signals/traces/)\n- [OpenTelemetry `trace.proto`](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.1.0/opentelemetry/proto/trace/v1/trace.proto)\n\nWhat's next\n-----------\n\n- Learn about [context and context propagation](/trace/docs/trace-context).\n- Learn about [sampling](/trace/docs/trace-sampling)."]]