Skip to content

Commit 24284d8

Browse files
committed
Update description of span duration and composite sum
1 parent b827b2b commit 24284d8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docs/spec/v2/span.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"minimum": 2
4040
},
4141
"sum": {
42-
"description": "Sum is the durations of all compressed spans this composite span represents in milliseconds. Thus sum is the net duration of all the compressed spans while duration is the gross duration, including \"whitespace\" between the spans.",
42+
"description": "Sum is the durations of all compressed spans this composite span represents in milliseconds.",
4343
"type": "number",
4444
"minimum": 0
4545
}
@@ -504,7 +504,7 @@
504504
}
505505
},
506506
"duration": {
507-
"description": "Duration of the span in milliseconds",
507+
"description": "Duration of the span in milliseconds. When the span is a composite one, duration is the gross duration, including \"whitespace\" in between spans.",
508508
"type": "number",
509509
"minimum": 0
510510
},

model/modeldecoder/v2/model.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,8 @@ type span struct {
609609
Composite spanComposite `json:"composite"`
610610
// Context holds arbitrary contextual information for the event.
611611
Context spanContext `json:"context"`
612-
// Duration of the span in milliseconds
612+
// Duration of the span in milliseconds. When the span is a composite one,
613+
// duration is the gross duration, including "whitespace" in between spans.
613614
Duration nullable.Float64 `json:"duration" validate:"required,min=0"`
614615
// ID holds the hex encoded 64 random bits ID of the event.
615616
ID nullable.String `json:"id" validate:"required,maxLength=1024"`
@@ -775,9 +776,7 @@ type spanComposite struct {
775776
// The minimum count is 2, as a composite span represents at least two spans.
776777
Count nullable.Int `json:"count" validate:"required,min=2"`
777778
// Sum is the durations of all compressed spans this composite span
778-
// represents in milliseconds. Thus sum is the net duration of all the
779-
// compressed spans while duration is the gross duration, including
780-
// "whitespace" between the spans.
779+
// represents in milliseconds.
781780
Sum nullable.Float64 `json:"sum" validate:"required,min=0"`
782781
// A string value indicating which compression strategy was used. The valid
783782
// values are `exact_match` and `same_kind`.

0 commit comments

Comments
 (0)