Skip to content

Commit

Permalink
Speed Up Trace Uploads in GHA (#19078)
Browse files Browse the repository at this point in the history
* Run the master PR on pull requests for testing

* Log less while replaying traces.

* Fix response printing.

* Better fix for ResponseNotReady

* Set the agent log level to "warn" for uploading traces.

* Remove testing code.
  • Loading branch information
nubtron authored Nov 19, 2024
1 parent 48e66a3 commit f3dbc6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .ddev/ci/scripts/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def replay(*, record_file: str, port: int) -> None:
record = json.loads(line)
path = record['path']
body = b64decode(record['body'])

print(f'PUT {path} {len(body)} bytes: ', end='')
conn.request('PUT', path, body=body, headers=record['headers'])
print(conn.getresponse().read().decode('utf-8'))
response = conn.getresponse()
response.read() # Needs to be done to prevent ResponseNotReady.
print(response.status, response.reason)


def main():
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submit-traces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
DD_API_KEY: "${{ secrets.DD_API_KEY }}"
DD_HOSTNAME: "none"
DD_INSIDE_CI: "true"
DD_LOG_LEVEL: "trace"
DD_LOG_LEVEL: "warn"

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit f3dbc6b

Please sign in to comment.