HTTP communication
If you are using automatic instrumentation, spans are created and attributes are filled automatically. If using manual instrumentation, follow the conventions described below:
Naming convention
- Client span:
<Method>if the URL template is unknown, or<url.template> <method>if known, e.g.,GET /users/{user_id}. - Server span:
<http.route> <method>, e.g.,GET /users/:user_id.
If the client does not use templated URLs, the span name contains only the method. If the template is known, it is included into the name via the url.template attribute. The server span includes a templated route (/users/:user_id) instead of a specific path (/users/321). For more information, see the HTTP span naming specification
Attributes
|
Attribute |
Description |
|
|
HTTP method: |
|
|
Response code: |
|
|
Templated server-side route: |
|
|
Request schema: |
|
|
Full request URL |
|
|
Templated client-side URL: |
|
|
Host name or IP address of the target server |
|
|
Target server port |
|
|
Client IP address |
Example
order-service requests user data from user-service over HTTP:
|
Attribute |
Client span |
Server span |
|
Name |
|
|
|
Kind |
|
|
|
Status |
|
|
|
|
|
|
|
|
— |
|
|
|
|
— |
|
|
|
|
|
|
|
|
|
|
|
— |
|
|
|
— |
|
|
|
— |
|
|
— |
|