Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/blobs/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export class Store {
})

span?.setAttributes({
'blobs.response.body.size': res.headers.get('content-length') ?? undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attribute name inspired by https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-body-size

http.response.body.size
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.

'blobs.response.status': res.status,
})

Expand Down Expand Up @@ -328,6 +329,7 @@ export class Store {
const responseETag = res?.headers.get('etag') ?? undefined

span?.setAttributes({
'blobs.response.body.size': res.headers.get('content-length') ?? undefined,
'blobs.response.etag': responseETag,
'blobs.response.status': res.status,
})
Expand Down