WebRequest¶
Semantic Span Attributes¶
Attribute Key/Name | Attribute Value | Obfuscated/Unset when -Dfr.observability.trace.attributes.semantics.obfuscation.enabled=true |
---|---|---|
net.peer.name | Remote hostname. | True |
net.peer.ip | Remote IP | True |
net.peer.port | Remote port. | True |
http.method | HTTP request method. | False |
http.url | Full HTTP request URL. | Query String |
http.flavor | HTTP protocol. | False |
http.user_agent | HTTP user-agent header value. | False |
http.status_code | HTTP response status code. | False |
http.response.content_length | HTTP response payload in bytes. | False |
http.request.header.{header_key} | The HTTP header value corresponding to the specified request header key. | False |
http.response.header.{header_key} | The HTTP header value corresponding to the specified response header key. | False |
http.request.route.path_parameter.{templated_parameter_name} | When span names are the templated route, the actual, templated value will be stored as a span attribute. | False |
Span Name¶
Span names for WebRequests are the request path e.g /api/endpoint
(with no query string) or other URL representations. Can also be templated route e.g. /documents/{document_id}
.
Specifying HTTP Header Attributes¶
An HTTP header attribute will be set on a span if there's a header on the request/response whose header key matches one of the user-specified header keys.
Methods to Specify Header Keys:¶
- Within the on premise FusionReactor UI, go to Requests Settings and specify the headers within the
Add Request/Response Header Names
form inputs and save. - Within the reactor.conf, set
request.header.names={comma-separated list of header keys/names}
for request headers andresponse.header.names={comma-separated list of header keys/names}
for response headers. - With System Properties, set
-Dfr.observability.trace.attributes.request.headers={comma-separated list of header keys/names}
for request headers and-Dfr.observability.trace.attributes.response.headers={comma-separated list of header keys/names}
for response headers.
Things to be aware of¶
- The header_keys in
http.request.header.{header_key}
andhttp.response.header.{header_key}
are forced to lowercase and have their-
characters replaced with_
. - You can combine specifying header keys via system properties and FusionReactor configuration.
- For templated routes e.g.
/documents/{document_id}
, the span name will become the templated route and any templated parameters will be added as a span attribute ashttp.request.route.path_parameter.{templated_parameter_name}
.
Properties for WebRequest¶
Check the attributes page for general properties that can affect WebRequests.
Property Key | Default | Description |
---|---|---|
fr.observability.trace.attributes.request.headers |
"" |
Comma separated list of request header names to match and attach header to WebRequest, OkHttp and Httpclient span attributes. |
fr.observability.trace.attributes.response.headers |
"" |
Comma separated list of response header names to match and attach header to WebRequest, OkHttp and Httpclient span attributes. |
fr.observability.trace.attributes.route.templated.enabled |
true |
Whether to attempt to process request objects for their templated path/route when possible. This will be set as the span name for the master transaction's span. E.g. /show/{user} instead of /show/user001 |
fr.observability.trace.attributes.route.templated.parameters.enabled |
true |
When retrieving templated paths for routes, will also attempt to retrieve the path parameters and set as span attributes if possible. Will appear as http.request.route.path_parameter.{templated_parameter_name} . Is disabled if fr.observability.trace.attributes.route.templated is disabled. |
Example Span¶
![]() |
---|
Brief example of an WebRequest span. |