Skip to content

Commit

Permalink
Mac OS platform handling (#780)
Browse files Browse the repository at this point in the history
- Alias "arm64" to "aarch64" to use existing overrides/builds
- Add a hint that core agent download failed http response check
  • Loading branch information
lancetarn authored Oct 31, 2023
1 parent b4401f0 commit c8832df
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Pending

### Fixed
- Core Agent fails to download on newer Mac OS/Apple Silicon (Issue #779)

## [3.0.0rc1] 2023-09-08

Version 3.0.0 drops support for Python 2.7 and < 3.8, as well as Django < 3.2.
Expand Down
2 changes: 2 additions & 0 deletions src/scout_apm/core/agent/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def download(self):
downloaded = self.download_package()
if downloaded:
self.untar()
else:
logger.debug("Core Agent download failed: bad http response.")
except (OSError, HTTPError):
logger.exception("Exception raised while downloading Core Agent")
finally:
Expand Down
4 changes: 4 additions & 0 deletions src/scout_apm/core/platform_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def get_arch():
return "x86_64"
elif arch == "aarch64":
return "aarch64"
elif arch == "arm64":
# We treat these as synonymous and name them "aarch64" for consistency
# Mac OS, for example, uses "arm64"
return "aarch64"
else:
return "unknown"

Expand Down
1 change: 1 addition & 0 deletions src/scout_apm/core/tracked_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def annotate(self):

def add_allocation_tags(self):
if not objtrace.is_extension:
logger.debug("Not adding allocation tags: extension not loaded")
return

start_allocs = (
Expand Down

0 comments on commit c8832df

Please sign in to comment.