Skip to content

Commit

Permalink
Addressing feedback
Browse files Browse the repository at this point in the history
Rewording recommendation to use a more generic RPC

Adding a small blurb clarifying sub operations can be instrumented.
  • Loading branch information
toumorokoshi committed May 16, 2020
1 parent 4dfa80d commit 8099078
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,20 @@ hypothetical account information:
The `Span`'s start and end timestamps reflect the elapsed real time of the
operation.

For example, an http server span should start right when the request has begun being handled by the server, and end when the response has been completely sent.
This would include the following, if they are present in that particular
request-response cycle:

- receiving the HTTP request
- parsing of the HTTP request
- parsing of the body of the HTTP request
- any web server middleware that is applied
For example, If a span represents a request-response cycle (e.g. HTTP or an RPC),
the span should have a start time that corresponds to the start time of the
first sub operations, and an end time of when the final sub operation is complete.
This includes:

- receiving the data from the request
- parsing of the data (e.g. from a binary or json format)
- any middleware or additional processing logic
- business logic
- construction of the HTTP response
- sending of the HTTP response
- construction of the response
- sending of the response

Child spans may be created to represent any sub-operations, to provide more
granular observability.

A `Span`'s start time SHOULD be set to the current time on [span
creation](#span-creation). After the `Span` is created, it SHOULD be possible to
Expand Down

0 comments on commit 8099078

Please sign in to comment.