Skip to content

Commit

Permalink
Update description of span duration and composite sum
Browse files Browse the repository at this point in the history
  • Loading branch information
estolfo committed Jul 20, 2021
1 parent 8187914 commit ce064c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/spec/v2/span.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"minimum": 2
},
"sum": {
"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.",
"description": "Sum is the durations of all compressed spans this composite span represents in milliseconds.",
"type": "number",
"minimum": 0
}
Expand Down Expand Up @@ -504,7 +504,7 @@
}
},
"duration": {
"description": "Duration of the span in milliseconds",
"description": "Duration of the span in milliseconds. When the span is a composite one, duration is the gross duration, including \"whitespace\" in between spans.",
"type": "number",
"minimum": 0
},
Expand Down
7 changes: 3 additions & 4 deletions model/modeldecoder/v2/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ type span struct {
Composite spanComposite `json:"composite"`
// Context holds arbitrary contextual information for the event.
Context spanContext `json:"context"`
// Duration of the span in milliseconds
// Duration of the span in milliseconds. When the span is a composite one,
// duration is the gross duration, including "whitespace" in between spans.
Duration nullable.Float64 `json:"duration" validate:"required,min=0"`
// ID holds the hex encoded 64 random bits ID of the event.
ID nullable.String `json:"id" validate:"required,maxLength=1024"`
Expand Down Expand Up @@ -775,9 +776,7 @@ type spanComposite struct {
// The minimum count is 2, as a composite span represents at least two spans.
Count nullable.Int `json:"count" validate:"required,min=2"`
// 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.
// represents in milliseconds.
Sum nullable.Float64 `json:"sum" validate:"required,min=0"`
// A string value indicating which compression strategy was used. The valid
// values are `exact_match` and `same_kind`.
Expand Down

0 comments on commit ce064c5

Please sign in to comment.