@@ -15,7 +15,6 @@ Table of Contents
15
15
* [ GetCurrentSpan] ( #getcurrentspan )
16
16
* [ WithSpan] ( #withspan )
17
17
* [ SpanBuilder] ( #spanbuilder )
18
- * [ RecordSpanData] ( #recordspandata )
19
18
* [ GetBinaryFormat] ( #getbinaryformat )
20
19
* [ GetHttpTextFormat] ( #gethttptextformat )
21
20
* [ SpanContext] ( #spancontext )
@@ -37,20 +36,6 @@ Table of Contents
37
36
* [ GetCanonicalCode] ( #getcanonicalcode )
38
37
* [ GetDescription] ( #getdescription )
39
38
* [ GetIsOk] ( #getisok )
40
- * [ SpanData] ( #spandata )
41
- * [ Constructing SpanData] ( #constructing-spandata )
42
- * [ Getters] ( #getters )
43
- * [ GetName] ( #getname )
44
- * [ GetKind] ( #getkind )
45
- * [ GetStartTimestamp] ( #getstarttimestamp )
46
- * [ GetEndTimestamp] ( #getendtimestamp )
47
- * [ GetContext] ( #getcontext )
48
- * [ GetParentSpanId] ( #getparentspanid )
49
- * [ GetResource] ( #getresource )
50
- * [ GetAttributes] ( #getattributes )
51
- * [ GetTimedEvents] ( #gettimedevents )
52
- * [ GetLinks] ( #getlinks )
53
- * [ GetStatus] ( #getstatus )
54
39
55
40
</details >
56
41
@@ -59,8 +44,6 @@ Tracing API consist of a few main classes:
59
44
- ` Tracer ` is used for all operations. See [ Tracer] ( #tracer ) section.
60
45
- ` Span ` is a mutable object storing information about the current operation
61
46
execution. See [ Span] ( #span ) section.
62
- - ` SpanData ` is an immutable object that is used to report out-of-band completed
63
- spans. See [ SpanData] ( #spandata ) section.
64
47
65
48
## Data types
66
49
While languages and platforms have different ways of representing data,
@@ -240,6 +223,14 @@ empty by default:
240
223
- ` Attribute ` s
241
224
- ` Link ` s
242
225
- ` Event ` s
226
+ - ` Start timestamp `
227
+
228
+ N.B.: There is an active RFC to remove [ out of band span reporting] ( https://github.com/open-telemetry/oteps/pull/26 )
229
+ so the following items below may be removed soon.
230
+
231
+ - ` Resource `
232
+ - ` SpanID `
233
+ - ` OutOfBand ` to specify the span originated from out of band
243
234
244
235
Each span has zero or one parent span and zero or more child spans, which
245
236
represent causally related operations. A tree of related spans comprises a
@@ -304,6 +295,7 @@ with the moment when they are added to the `Span`.
304
295
An ` Event ` is defined by the following properties:
305
296
- (Required) Name of the event.
306
297
- (Optional) One or more ` Attribute ` .
298
+ - (Optional) Timestamp for the event.
307
299
308
300
The ` Event ` SHOULD be an immutable type.
309
301
@@ -375,7 +367,8 @@ with the `Span`).
375
367
Call to ` End ` of a ` Span ` MUST not have any effects on child spans. Those may
376
368
still be running and can be ended later.
377
369
378
- There MUST be no parameter.
370
+ Parameters:
371
+ - (Optional) Timestamp to explicitly set the end timestamp
379
372
380
373
This API MUST be non-blocking.
381
374
@@ -388,8 +381,7 @@ timestamps to the Span object:
388
381
- The end time needs to be recorded when the operation is ended.
389
382
390
383
Start and end time as well as Event's timestamps MUST be recorded at a time of a
391
- calling of corresponding API and MUST not be passed as an argument. In order to
392
- record already completed span - [ ` SpanData ` ] ( #spandata ) API HAVE TO be used.
384
+ calling of corresponding API.
393
385
394
386
## Status
395
387
@@ -473,93 +465,3 @@ Returns the description of this `Status`.
473
465
### GetIsOk
474
466
475
467
Returns false if this ` Status ` represents an error, else returns true.
476
-
477
- ## SpanData
478
-
479
- ` SpanData ` is an immutable and final class. All getters of ` SpanData ` are thread
480
- safe and can be called any number of times.
481
-
482
- ` API ` MUST provide a way of [ constructing ` SpanData ` ] ( #constructing-spandata )
483
- that can be recorded using ` Tracer ` method ` RecordSpanData ` .
484
-
485
- ### Constructing SpanData
486
-
487
- ` SpanData ` is an immutable object that can be constructed using the following
488
- arguments:
489
-
490
- - ` SpanContext ` identifying this ` SpanData ` .
491
- - Parent's ` SpanId ` . All-zeroes ` SpanId ` or ` null ` MUST be assumed and
492
- interchangeable if ` SpanData ` has no parent.
493
- - ` Resource ` this SpanData is recorded for. If not specified - ` Tracer ` 's
494
- ` Resource ` will be used instead when the ` RecordSpanData ` called on the
495
- ` Tracer ` .
496
- - Name of this ` SpanData ` .
497
- - ` Kind ` of this ` SpanData ` . ` SpanKind.Internal ` MUST be assumed as a default.
498
- - Start and End timestamps.
499
- - Set of attributes with the string key and the value, which must be either a
500
- string, a boolean value, or a numeric type.
501
- - Set of ` Events ` .
502
- - Set of ` Links ` .
503
- - ` Status ` of ` SpanData ` execution.
504
-
505
- All collections passes as an argument MUST be either immutable if language
506
- allows it or copied so the change of the collection will not mutate the
507
- ` SpanData ` .
508
-
509
- ### Getters
510
-
511
- Getters will be called by exporters in SDK. Implementation MUST not assume that
512
- getters will be called only once or at all. There also MUST be no expectations
513
- on how soon getters will be called after object creation.
514
-
515
- #### GetName
516
-
517
- Returns the name of this ` SpanData ` .
518
-
519
- #### GetKind
520
-
521
- Returns the ` SpanKind ` of this ` SpanData ` .
522
-
523
- #### GetStartTimestamp
524
-
525
- Returns the start timestamp of this ` SpanData ` .
526
-
527
- #### GetEndTimestamp
528
-
529
- Returns the end timestamp of this ` SpanData ` .
530
-
531
- #### GetContext
532
-
533
- Returns the ` SpanContext ` associated with this ` SpanData ` .
534
-
535
- #### GetParentSpanId
536
-
537
- Returns the ` SpanId ` of the parent of this ` SpanData ` .
538
-
539
- #### GetResource
540
-
541
- Returns the ` Resource ` associated with this ` SpanData ` . When ` null ` is returned
542
- the assumption is that ` Resource ` will be taken from the ` Tracer ` that is used
543
- to record this ` SpanData ` .
544
-
545
- #### GetAttributes
546
-
547
- Returns the ` Attributes ` collection associated with this ` SpanData ` . The order
548
- of attributes in collection is not significant. The typical use of attributes
549
- collection is enumeration so the fast access to the label value by it's key is
550
- not a requirement. This collection MUST be immutable.
551
-
552
- #### GetTimedEvents
553
-
554
- Return the collection of ` Events ` with the timestamps associated with this
555
- ` SpanData ` . The order of events in collection is not guaranteed. This collection
556
- MUST be immutable.
557
-
558
- #### GetLinks
559
-
560
- Returns the ` Links ` collection associated with this ` SpanData ` . The order of
561
- links in collection is not significant. This collection MUST be immutable.
562
-
563
- #### GetStatus
564
-
565
- Returns the ` Status ` of this ` SpanData ` .
0 commit comments