Datadog APM & Distributed Tracing Fundamentals free question 5 / 10 · Domain 2: Application Instrumentation
For HTTP spans from a tracing library, how does the official documentation describe the handling of the query string in http.url?
- It is parsed by default, and suspicious values are replaced with <redacted>
- It is hashed by default and stored in a form that cannot be restored
- It is removed by default along with the query string, leaving the URL path as the tag value
- It is left untouched by default and stored as the tag value as is
Show the answer and explanation
Answer: A
Why this is correct
The documentation says the http.url tag holds the full URL including the query string, and that because query strings can contain sensitive data, Datadog by default parses the query string and removes suspicious values. The regular expression used for redaction can be changed with DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP, and a suspicious key-value pair that is found is replaced with <redacted>.
Why the other options are wrong
"It is left untouched by default and stored as the tag value as is" … The documentation says parsing and redaction work by default, so the value is not passed through.
"It is removed by default along with the query string, leaving the URL path as the tag value" … Dropping the whole query string is the behavior you get when DD_HTTP_SERVER_TAG_QUERY_STRING is set to false.
"It is hashed by default and stored in a form that cannot be restored" … No hashing is described. What is replaced is limited to suspicious values.
Common pitfall
The default regular expression only catches pairs that look sensitive by name. A token passed under your own naming remains, so add to the expression with the variable or choose not to collect the query string at all with DD_HTTP_SERVER_TAG_QUERY_STRING.