We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cc57de commit a2d3ae6Copy full SHA for a2d3ae6
packages/core/src/fetch.ts
@@ -265,8 +265,12 @@ function getFetchSpanAttributes(
265
attributes['http.url'] = parsedUrl.href;
266
attributes['server.address'] = parsedUrl.host;
267
}
268
- attributes['http.query'] = parsedUrl.search;
269
- attributes['http.fragment'] = parsedUrl.hash;
+ if (parsedUrl.search) {
+ attributes['http.query'] = parsedUrl.search;
270
+ }
271
+ if (parsedUrl.hash) {
272
+ attributes['http.fragment'] = parsedUrl.hash;
273
274
275
return attributes;
276
0 commit comments