-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Describe the use of the traceparent header
Fixes #143
- Loading branch information
Showing
15 changed files
with
93 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
### Trace Context header | ||
|
||
For all transaction described in this implementation guide, the HTTP `traceparent` | ||
header is required. This header is defined in the | ||
[W3C Trace Context Recommendation](https://www.w3.org/TR/trace-context/). | ||
|
||
The header value is made of four parts separated by dashes: the **version**, **trace-id**, **parent-id** and | ||
**trace-flags**. For example: | ||
|
||
```http | ||
GET /request HTTP/1.1 | ||
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00 | ||
``` | ||
|
||
- The **version** is currently set to `00`. | ||
- The **trace-id** is a unique identifier for this transaction instance (i.e. an HTTP request and its response). | ||
It is a 16-byte array encoded as 32 hexadecimal characters, all lowercase. | ||
- The **parent-id** is a unique identifier for this message. It is an 8-byte array, encoded as 16 hexadecimal | ||
characters, all lowercase. | ||
- The **trace-flags** is used to communicate tracing flags with the consumer. This implementation guide specifies no | ||
requirements for this field, it is recommended using the value `00`. | ||
|
||
Each actor shall support the `traceparent` header. Grouped actors shall use the same **trace-id** value to correlate IHE transactions. | ||
|
||
##### Audit event requirements | ||
|
||
The `traceparent` header value of the generated message SHALL be added to the generated Audit Event: for the client, the | ||
header value of the request; for the responder, the header value of the response. | ||
It is described as an `AuditEvent.entity`, with the system `https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType#Traceparent`, as demonstrated below. | ||
|
||
```json | ||
{ | ||
"resourceType" : "AuditEvent", | ||
/* Rest of the AuditEvent */ | ||
"entity" : [ | ||
{ | ||
"what" : { | ||
"identifier" : { | ||
"value" : "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00" | ||
} | ||
}, | ||
"type" : { | ||
"system" : "https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType", | ||
"code" : "Traceparent" | ||
} | ||
} | ||
] | ||
} | ||
``` |