We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c4327d commit 63938b0Copy full SHA for 63938b0
packages/otel/src/instrumentations/fetch.ts
@@ -61,6 +61,7 @@ export class FetchInstrumentation implements Instrumentation {
61
'http.response.status_code': response.status,
62
...this.prepareHeaders('response', response.headers),
63
})
64
+ span.setStatus({ code: response.status >= 400 ? api.SpanStatusCode.ERROR : api.SpanStatusCode.UNSET })
65
}
66
67
private prepareHeaders(type: 'request' | 'response', headers: Headers): api.Attributes {
0 commit comments