Clarify span event definition (#1451)
This commit is contained in:
parent
9c3edfc0f8
commit
bfc34368cc
|
|
@ -103,10 +103,10 @@ components that will play a part in instrumenting our code:
|
||||||
|
|
||||||
A Tracer Provider (sometimes called `TracerProvider`) is a factory for
|
A Tracer Provider (sometimes called `TracerProvider`) is a factory for
|
||||||
`Tracer`s. In most applications, a Tracer Provider is initialized once and its
|
`Tracer`s. In most applications, a Tracer Provider is initialized once and its
|
||||||
lifecycle matches the application's lifecycle. Tracer Provider
|
lifecycle matches the application's lifecycle. Tracer Provider initialization
|
||||||
initialization also includes Resource and Exporter initialization. It is
|
also includes Resource and Exporter initialization. It is typically the first
|
||||||
typically the first step in tracing with OpenTelemetry. In some language SDKs, a
|
step in tracing with OpenTelemetry. In some language SDKs, a global Tracer
|
||||||
global Tracer Provider is already initialized for you.
|
Provider is already initialized for you.
|
||||||
|
|
||||||
### Tracer
|
### Tracer
|
||||||
|
|
||||||
|
|
@ -239,13 +239,19 @@ annotate a Span to carry information about the operation it is tracking.
|
||||||
### Span Events
|
### Span Events
|
||||||
|
|
||||||
A Span Event can be thought of as a structured log message (or annotation) on a
|
A Span Event can be thought of as a structured log message (or annotation) on a
|
||||||
Span, provides additional context on what is occurring during a specific
|
Span, typically used to denote a meaningful, singular point in time during the
|
||||||
operation.
|
Span's duration.
|
||||||
|
|
||||||
For example, a critical path in a multi-threaded application might need to
|
For example, consider two scenarios in a web browser:
|
||||||
acquire a lock on a mutex to have exclusive access to a resource. An Event can
|
|
||||||
be created at two points: once when the resource is acquired, and once when it
|
1. Tracking a page load
|
||||||
is released.
|
2. Denoting when a page becomes interactive
|
||||||
|
|
||||||
|
A Span is best used to the first scenario because it's an operation with a start
|
||||||
|
and an end.
|
||||||
|
|
||||||
|
A Span Event is best used to track the second scenario because it represents a
|
||||||
|
meaningful, singular point in time.
|
||||||
|
|
||||||
### Span Links
|
### Span Links
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue