Skip to content

Commit d126de2

Browse files
fix: add payload size and bump test-results-parser (#105)
- Bumps `test-results-parser` to 0.6.1 to support `py14` - Add `payload_size` to telemetry data
1 parent 10f3e95 commit d126de2

File tree

4 files changed

+173
-118
lines changed

4 files changed

+173
-118
lines changed

codecov-cli/codecov_cli/services/upload/upload_sender.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import logging
44
import typing
5+
import sys
56
import zlib
67
from typing import Any, Dict
78

@@ -124,8 +125,10 @@ def send_upload_data(
124125
)
125126
put_url = resp_json_obj["raw_upload_location"]
126127

127-
with sentry_sdk.start_span(name="upload_sender_storage"):
128-
logger.debug("Sending upload to storage")
128+
with sentry_sdk.start_span(name="upload_sender_storage") as storage_span:
129+
payload_size = sys.getsizeof(reports_payload)
130+
storage_span.set_data("payload_size", payload_size)
131+
logger.debug(f"Sending upload ({payload_size} bytes) to storage")
129132
resp_from_storage = send_put_request(put_url, data=reports_payload)
130133

131134
return resp_from_storage

codecov-cli/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "codecov-cli"
3-
version = "11.2.5"
3+
version = "11.2.6"
44
description = "Codecov Command Line Interface"
55
readme = "README.md"
66
license-files = ["LICENSE"]
@@ -17,7 +17,7 @@ dependencies = [
1717
"PyYAML==6.*",
1818
"responses==0.21.*",
1919
"sentry-sdk==2.*",
20-
"test-results-parser==0.6.0",
20+
"test-results-parser==0.6.1",
2121
]
2222

2323
[dependency-groups]

0 commit comments

Comments
 (0)