Skip to content

Commit

Permalink
Merge branch 'master' into feat/2148-tracePropagationTargets
Browse files Browse the repository at this point in the history
* master:
  release: 7.26.0
  meta: Fix Changelog concurrent transactions (#2229)
  build(deps): bump fastlane from 2.210.0 to 2.210.1 (#2224)
  Revert "feat: profile concurrent transactions (#2105)" (#2225)
  fix: Align core data span operations (#2222)
  test: Remove empty assert msg for AppStateTests (#2221)
  meta: Fix Changelog (#2219)
  ref: Add typealias for bytes (#2209)
  feat: profile concurrent transactions (#2105)
  ci: Readd cache for UI tests (#2215)

# Conflicts:
#	Sentry.xcodeproj/project.pbxproj
  • Loading branch information
kevinrenskers committed Sep 27, 2022
2 parents 5f7468b + 7138b7d commit 9f3a8a4
Show file tree
Hide file tree
Showing 24 changed files with 338 additions and 351 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## 7.26.0

### Features

Expand All @@ -15,6 +15,7 @@
- Sentry-trace header incorrectly assigned to http requests (#2167)
- Use the `component` name source for SentryPerformanceTracker (#2168)
- Add support for arm64 architecture to the device context (#2185)
- Align core data span operations (#2222)

## 7.25.1

Expand Down
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.631.0)
aws-sdk-core (3.148.0)
aws-partitions (1.636.0)
aws-sdk-core (3.154.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
Expand Down Expand Up @@ -86,7 +86,7 @@ GEM
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
excon (0.92.4)
excon (0.92.5)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -116,7 +116,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.210.0)
fastlane (2.210.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -161,9 +161,9 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.26.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-core (0.7.2)
google-apis-androidpublisher_v3 (0.28.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-core (0.9.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -172,10 +172,10 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.13.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-iamcredentials_v1 (0.15.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-playcustomapp_v1 (0.11.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-storage_v1 (0.17.0)
google-apis-core (>= 0.7, < 2.a)
google-cloud-core (1.6.0)
Expand All @@ -184,7 +184,7 @@ GEM
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0)
google-cloud-storage (1.40.0)
google-cloud-storage (1.42.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
Expand Down
8 changes: 4 additions & 4 deletions Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.25.1;
MARKETING_VERSION = 7.26.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift";
Expand Down Expand Up @@ -1111,7 +1111,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.25.1;
MARKETING_VERSION = 7.26.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift";
Expand Down Expand Up @@ -1310,7 +1310,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.25.1;
MARKETING_VERSION = 7.26.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift.Clip";
Expand Down Expand Up @@ -1345,7 +1345,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.25.1;
MARKETING_VERSION = 7.26.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift.Clip";
Expand Down
2 changes: 1 addition & 1 deletion Sentry.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sentry"
s.version = "7.25.1"
s.version = "7.26.0"
s.summary = "Sentry client for cocoa"
s.homepage = "https://github.com/getsentry/sentry-cocoa"
s.license = "mit"
Expand Down
4 changes: 4 additions & 0 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
0A9BF4E428A114B50068D266 /* SentryViewHierarchyIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A9BF4E328A114B50068D266 /* SentryViewHierarchyIntegration.h */; };
0A9BF4E928A125390068D266 /* TestSentryViewHierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4E628A123270068D266 /* TestSentryViewHierarchy.swift */; };
0A9BF4EB28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */; };
0A9E917128DC7E7000FB4182 /* SentryInternalDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A9E917028DC7E7000FB4182 /* SentryInternalDefines.h */; };
0AABE2ED2885924A0057ED69 /* SentryPermissionsObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AABE2EC2885924A0057ED69 /* SentryPermissionsObserver.m */; };
0ACBA10128A6406400D711F7 /* UIView+Sentry.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ACBA10028A6406400D711F7 /* UIView+Sentry.m */; };
0ACBA10328A6407200D711F7 /* UIView+Sentry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0ACBA10228A6407200D711F7 /* UIView+Sentry.h */; };
Expand Down Expand Up @@ -758,6 +759,7 @@
0A9BF4E628A123270068D266 /* TestSentryViewHierarchy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryViewHierarchy.swift; sourceTree = "<group>"; };
0A9BF4EA28A127120068D266 /* SentryViewHierarchyIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewHierarchyIntegrationTests.swift; sourceTree = "<group>"; };
0AA0F74328E2FCD900AB840C /* SentryNetworkTracker+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryNetworkTracker+Private.h"; sourceTree = "<group>"; };
0A9E917028DC7E7000FB4182 /* SentryInternalDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryInternalDefines.h; path = include/SentryInternalDefines.h; sourceTree = "<group>"; };
0AABE2EC2885924A0057ED69 /* SentryPermissionsObserver.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPermissionsObserver.m; sourceTree = "<group>"; };
0AABE2EE288592750057ED69 /* SentryPermissionsObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryPermissionsObserver.h; path = include/SentryPermissionsObserver.h; sourceTree = "<group>"; };
0AABE2EF2885C2120057ED69 /* TestSentryPermissionsObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentryPermissionsObserver.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1809,6 +1811,7 @@
7B2A70DC27D6083D008B0D15 /* SentryThreadWrapper.m */,
7B18DE3F28D9F748004845C6 /* SentryNSNotificationCenterWrapper.h */,
7B18DE4128D9F794004845C6 /* SentryNSNotificationCenterWrapper.m */,
0A9E917028DC7E7000FB4182 /* SentryInternalDefines.h */,
);
name = Helper;
sourceTree = "<group>";
Expand Down Expand Up @@ -2959,6 +2962,7 @@
D8479328278873A100BE8E99 /* SentryByteCountFormatter.h in Headers */,
63AA76981EB9C1C200D153DE /* SentryClient.h in Headers */,
63AA76971EB9C1C200D153DE /* Sentry.h in Headers */,
0A9E917128DC7E7000FB4182 /* SentryInternalDefines.h in Headers */,
63FE711F20DA4C1000CDBAE8 /* SentryCrashObjC.h in Headers */,
7BC3936825B1AB3E004F03D3 /* SentryLevelMapper.h in Headers */,
8E4E7C6E25DAAAFE006AB9E2 /* SentrySpan.h in Headers */,
Expand Down
2 changes: 1 addition & 1 deletion Sources/Configuration/Sentry.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ MACH_O_TYPE = mh_dylib
FRAMEWORK_VERSION = A

PRODUCT_NAME = Sentry
CURRENT_PROJECT_VERSION = 7.25.1
CURRENT_PROJECT_VERSION = 7.26.0
INFOPLIST_FILE = Sources/Sentry/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = io.sentry.Sentry
ALWAYS_SEARCH_USER_PATHS = NO
Expand Down
44 changes: 22 additions & 22 deletions Sources/Sentry/SentryClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -768,35 +768,35 @@ - (void)applyCultureContextToEvent:(SentryEvent *)event

- (void)applyExtraDeviceContextToEvent:(SentryEvent *)event
{
[self modifyContext:event
key:@"device"
block:^(NSMutableDictionary *device) {
device[SentryDeviceContextFreeMemoryKey] = @(self.crashWrapper.freeMemory);
device[@"free_storage"] = @(self.crashWrapper.freeStorage);
[self
modifyContext:event
key:@"device"
block:^(NSMutableDictionary *device) {
device[SentryDeviceContextFreeMemoryKey] = @(self.crashWrapper.freeMemorySize);
device[@"free_storage"] = @(self.crashWrapper.freeStorageSize);

#if TARGET_OS_IOS
if (self.deviceWrapper.orientation != UIDeviceOrientationUnknown) {
device[@"orientation"]
= UIDeviceOrientationIsPortrait(self.deviceWrapper.orientation)
? @"portrait"
: @"landscape";
}

if (self.deviceWrapper.isBatteryMonitoringEnabled) {
device[@"charging"]
= self.deviceWrapper.batteryState == UIDeviceBatteryStateCharging
? @(YES)
: @(NO);
device[@"battery_level"] =
@((int)(self.deviceWrapper.batteryLevel * 100));
}
if (self.deviceWrapper.orientation != UIDeviceOrientationUnknown) {
device[@"orientation"]
= UIDeviceOrientationIsPortrait(self.deviceWrapper.orientation)
? @"portrait"
: @"landscape";
}

if (self.deviceWrapper.isBatteryMonitoringEnabled) {
device[@"charging"]
= self.deviceWrapper.batteryState == UIDeviceBatteryStateCharging
? @(YES)
: @(NO);
device[@"battery_level"] = @((int)(self.deviceWrapper.batteryLevel * 100));
}
#endif
}];
}];

[self modifyContext:event
key:@"app"
block:^(NSMutableDictionary *app) {
app[SentryDeviceContextAppMemoryKey] = @(self.crashWrapper.appMemory);
app[SentryDeviceContextAppMemoryKey] = @(self.crashWrapper.appMemorySize);
}];
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/SentryCrashIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ + (void)enrichScope:(SentryScope *)scope crashWrapper:(SentryCrashWrapper *)cras
[deviceData setValue:systemInfo[@"cpuArchitecture"] forKey:@"arch"];
[deviceData setValue:systemInfo[@"machine"] forKey:@"model"];
[deviceData setValue:systemInfo[@"model"] forKey:@"model_id"];
[deviceData setValue:systemInfo[@"freeMemory"] forKey:SentryDeviceContextFreeMemoryKey];
[deviceData setValue:systemInfo[@"usableMemory"] forKey:@"usable_memory"];
[deviceData setValue:systemInfo[@"freeMemorySize"] forKey:SentryDeviceContextFreeMemoryKey];
[deviceData setValue:systemInfo[@"usableMemorySize"] forKey:@"usable_memory"];
[deviceData setValue:systemInfo[@"memorySize"] forKey:@"memory_size"];
[deviceData setValue:systemInfo[@"totalStorageSize"] forKey:@"storage_size"];
[deviceData setValue:systemInfo[@"freeStorageSize"] forKey:@"free_storage"];
Expand Down
10 changes: 5 additions & 5 deletions Sources/Sentry/SentryCrashWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ - (NSDictionary *)systemInfo
return sharedInfo;
}

- (uint64_t)freeMemory
- (bytes)freeMemorySize
{
return sentrycrashcm_system_freememory();
return sentrycrashcm_system_freememory_size();
}

- (uint64_t)freeStorage
- (bytes)freeStorageSize
{
return sentrycrashcm_system_freestorage();
return sentrycrashcm_system_freestorage_size();
}

- (uint64_t)appMemory
- (bytes)appMemorySize
{
task_vm_info_data_t info;
mach_msg_type_number_t size = TASK_VM_INFO_COUNT;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryMeta.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ @implementation SentryMeta
// Don't remove the static keyword. If you do the compiler adds the constant name to the global
// symbol table and it might clash with other constants. When keeping the static keyword the
// compiler replaces all occurrences with the value.
static NSString *versionString = @"7.25.1";
static NSString *versionString = @"7.26.0";
static NSString *sdkName = @"sentry.cocoa";

+ (NSString *)versionString
Expand Down
5 changes: 2 additions & 3 deletions Sources/Sentry/include/SentryCoreDataTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

NS_ASSUME_NONNULL_BEGIN

static NSString *const SENTRY_COREDATA_FETCH_OPERATION = @"db.query";

static NSString *const SENTRY_COREDATA_SAVE_OPERATION = @"db.transaction";
static NSString *const SENTRY_COREDATA_FETCH_OPERATION = @"db.sql.query";
static NSString *const SENTRY_COREDATA_SAVE_OPERATION = @"db.sql.transaction";

@interface SentryCoreDataTracker : NSObject <SentryCoreDataMiddleware>

Expand Down
7 changes: 4 additions & 3 deletions Sources/Sentry/include/SentryCrashWrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import "SentryDefines.h"
#import "SentryInternalDefines.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -30,11 +31,11 @@ SENTRY_NO_INIT

- (NSDictionary *)systemInfo;

- (uint64_t)freeMemory;
- (bytes)freeMemorySize;

- (uint64_t)appMemory;
- (bytes)appMemorySize;

- (uint64_t)freeStorage;
- (bytes)freeStorageSize;

@end

Expand Down
1 change: 1 addition & 0 deletions Sources/Sentry/include/SentryInternalDefines.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typedef unsigned long long bytes;
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ typedef struct SentryCrash_MonitorContext {
uint64_t totalStorageSize;
uint64_t freeStorageSize;
uint64_t memorySize;
uint64_t freeMemory;
uint64_t usableMemory;
uint64_t freeMemorySize;
uint64_t usableMemorySize;
} System;

struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ extern "C" {
#endif

#include "SentryCrashMonitor.h"
#import "SentryInternalDefines.h"

/** Access the Monitor API.
*/
SentryCrashMonitorAPI *sentrycrashcm_system_getAPI(void);

bool sentrycrash_isSimulatorBuild(void);

uint64_t sentrycrashcm_system_freememory(void);
uint64_t sentrycrashcm_system_freestorage(void);
bytes sentrycrashcm_system_freememory_size(void);
bytes sentrycrashcm_system_freestorage_size(void);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 9f3a8a4

Please sign in to comment.