Skip to content

Commit

Permalink
Merge 1ac57ea into 8b040e4
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann authored Oct 13, 2022
2 parents 8b040e4 + 1ac57ea commit fdbae9f
Show file tree
Hide file tree
Showing 23 changed files with 646 additions and 54 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Features

- [Custom measurements API](https://docs.sentry.io/platforms/apple/performance/instrumentation/custom-instrumentation/) (#2268)

## 7.27.1

### Fixes
Expand Down
5 changes: 5 additions & 0 deletions Samples/iOS-Swift/iOS-Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ class ViewController: UIViewController {

@IBAction func captureTransaction(_ sender: Any) {
let transaction = SentrySDK.startTransaction(name: "Some Transaction", operation: "Some Operation")

transaction.setMeasurement(name: "duration", value: 44, unit: MeasurementUnitDuration.nanosecond)
transaction.setMeasurement(name: "information", value: 44, unit: MeasurementUnitInformation.bit)
transaction.setMeasurement(name: "duration-custom", value: 22, unit: MeasurementUnit(unit: "custom"))

let span = transaction.startChild(operation: "user", description: "calls out")

DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: {
Expand Down
41 changes: 41 additions & 0 deletions Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@
remoteGlobalIDString = 7BB6224826A56C4E00D0E75E;
remoteInfo = "iOS-SwiftUI";
};
7BF01DB528F536BC00302035 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 63AA759B1EB8AEF500D153DE;
remoteInfo = Sentry;
};
7BF01DB728F536BC00302035 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 63AA76651EB8CB2F00D153DE;
remoteInfo = SentryTests;
};
84D4FEAD28ECD52E00EDAAFE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */;
Expand Down Expand Up @@ -163,6 +177,15 @@
name = Frameworks;
sourceTree = "<group>";
};
7BF01DB128F536BC00302035 /* Products */ = {
isa = PBXGroup;
children = (
7BF01DB628F536BC00302035 /* Sentry.framework */,
7BF01DB828F536BC00302035 /* SentryTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
84D4FEAB28ECD52E00EDAAFE /* Products */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -242,6 +265,10 @@
productRefGroup = 7BB6224A26A56C4E00D0E75E /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 7BF01DB128F536BC00302035 /* Products */;
ProjectRef = 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */;
},
{
ProductGroup = 84D4FEAB28ECD52E00EDAAFE /* Products */;
ProjectRef = 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */;
Expand All @@ -256,6 +283,20 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
7BF01DB628F536BC00302035 /* Sentry.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Sentry.framework;
remoteRef = 7BF01DB528F536BC00302035 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
7BF01DB828F536BC00302035 /* SentryTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = SentryTests.xctest;
remoteRef = 7BF01DB728F536BC00302035 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
84D4FEB228ECD52E00EDAAFE /* Sentry.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down
24 changes: 20 additions & 4 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@
7B6438A726A70DDB000D0F65 /* UIViewControllerSentryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6438A626A70DDB000D0F65 /* UIViewControllerSentryTests.swift */; };
7B6438AA26A70F24000D0F65 /* UIViewController+Sentry.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6438A826A70F24000D0F65 /* UIViewController+Sentry.h */; };
7B6438AB26A70F24000D0F65 /* UIViewController+Sentry.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B6438A926A70F24000D0F65 /* UIViewController+Sentry.m */; };
7B68345128F7EB3D00FB7064 /* SentryMeasurementUnitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B68345028F7EB3D00FB7064 /* SentryMeasurementUnitTests.swift */; };
7B68D93625FF5F1A0082D139 /* SentryAppState+Equality.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B68D93525FF5F1A0082D139 /* SentryAppState+Equality.m */; };
7B6ADFCF26A02CAE0076C206 /* SentryCrashReportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6ADFCE26A02CAE0076C206 /* SentryCrashReportTests.swift */; };
7B6C5ED2264E5D6C0010D138 /* SentryTransaction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6C5ED0264E5D6C0010D138 /* SentryTransaction+Private.h */; };
7B6C5ED6264E62CA0010D138 /* SentryTransactionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6C5ED5264E62CA0010D138 /* SentryTransactionTests.swift */; };
7B6C5EDA264E8D860010D138 /* SentryFramesTrackingIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6C5ED9264E8D860010D138 /* SentryFramesTrackingIntegration.h */; };
7B6C5EDC264E8DA80010D138 /* SentryFramesTrackingIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B6C5EDB264E8DA80010D138 /* SentryFramesTrackingIntegration.m */; };
Expand Down Expand Up @@ -492,6 +492,10 @@
7BC8523724588115005A70F0 /* SentryDataCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC8523624588115005A70F0 /* SentryDataCategory.h */; };
7BC852392458830A005A70F0 /* SentryEnvelopeItemType.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC852382458830A005A70F0 /* SentryEnvelopeItemType.h */; settings = {ATTRIBUTES = (Public, ); }; };
7BC8523B2458849E005A70F0 /* SentryDataCategoryMapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC8523A2458849E005A70F0 /* SentryDataCategoryMapperTests.swift */; };
7BC9A20028F41016001E7C4C /* SentryMeasurementValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC9A1FF28F41016001E7C4C /* SentryMeasurementValue.h */; };
7BC9A20228F41350001E7C4C /* SentryMeasurementUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC9A20128F41350001E7C4C /* SentryMeasurementUnit.h */; settings = {ATTRIBUTES = (Public, ); }; };
7BC9A20428F4166D001E7C4C /* SentryMeasurementValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BC9A20328F4166D001E7C4C /* SentryMeasurementValue.m */; };
7BC9A20628F41781001E7C4C /* SentryMeasurementUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BC9A20528F41781001E7C4C /* SentryMeasurementUnit.m */; };
7BCFA71627D0BB50008C662C /* SentryANRTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BCFA71527D0BB50008C662C /* SentryANRTracker.m */; };
7BCFBD672681C95000BC27D8 /* SentryScopeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BCFBD662681C95000BC27D8 /* SentryScopeObserver.h */; };
7BCFBD6D2681D0A900BC27D8 /* SentryCrashScopeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BCFBD6C2681D0A900BC27D8 /* SentryCrashScopeObserver.h */; };
Expand Down Expand Up @@ -1077,10 +1081,10 @@
7B6438A626A70DDB000D0F65 /* UIViewControllerSentryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UIViewControllerSentryTests.swift; path = Tests/SentryTests/Categories/UIViewControllerSentryTests.swift; sourceTree = SOURCE_ROOT; };
7B6438A826A70F24000D0F65 /* UIViewController+Sentry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Sentry.h"; path = "include/UIViewController+Sentry.h"; sourceTree = "<group>"; };
7B6438A926A70F24000D0F65 /* UIViewController+Sentry.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Sentry.m"; sourceTree = "<group>"; };
7B68345028F7EB3D00FB7064 /* SentryMeasurementUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryMeasurementUnitTests.swift; sourceTree = "<group>"; };
7B68D93425FF5F1A0082D139 /* SentryAppState+Equality.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryAppState+Equality.h"; sourceTree = "<group>"; };
7B68D93525FF5F1A0082D139 /* SentryAppState+Equality.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SentryAppState+Equality.m"; sourceTree = "<group>"; };
7B6ADFCE26A02CAE0076C206 /* SentryCrashReportTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCrashReportTests.swift; sourceTree = "<group>"; };
7B6C5ED0264E5D6C0010D138 /* SentryTransaction+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryTransaction+Private.h"; path = "include/SentryTransaction+Private.h"; sourceTree = "<group>"; };
7B6C5ED5264E62CA0010D138 /* SentryTransactionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTransactionTests.swift; sourceTree = "<group>"; };
7B6C5ED9264E8D860010D138 /* SentryFramesTrackingIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryFramesTrackingIntegration.h; path = include/SentryFramesTrackingIntegration.h; sourceTree = "<group>"; };
7B6C5EDB264E8DA80010D138 /* SentryFramesTrackingIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryFramesTrackingIntegration.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1224,6 +1228,10 @@
7BC8523624588115005A70F0 /* SentryDataCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryDataCategory.h; path = include/SentryDataCategory.h; sourceTree = "<group>"; };
7BC852382458830A005A70F0 /* SentryEnvelopeItemType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeItemType.h; path = Public/SentryEnvelopeItemType.h; sourceTree = "<group>"; };
7BC8523A2458849E005A70F0 /* SentryDataCategoryMapperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryDataCategoryMapperTests.swift; sourceTree = "<group>"; };
7BC9A1FF28F41016001E7C4C /* SentryMeasurementValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryMeasurementValue.h; path = include/SentryMeasurementValue.h; sourceTree = "<group>"; };
7BC9A20128F41350001E7C4C /* SentryMeasurementUnit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryMeasurementUnit.h; path = Public/SentryMeasurementUnit.h; sourceTree = "<group>"; };
7BC9A20328F4166D001E7C4C /* SentryMeasurementValue.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryMeasurementValue.m; sourceTree = "<group>"; };
7BC9A20528F41781001E7C4C /* SentryMeasurementUnit.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryMeasurementUnit.m; sourceTree = "<group>"; };
7BC9CD4326A99F660047518E /* SentryUIViewControllerSwizzling+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryUIViewControllerSwizzling+Test.h"; sourceTree = "<group>"; };
7BCFA71427D0BAB7008C662C /* SentryANRTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryANRTracker.h; path = include/SentryANRTracker.h; sourceTree = "<group>"; };
7BCFA71527D0BB50008C662C /* SentryANRTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryANRTracker.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1612,6 +1620,8 @@
7BD4BD4427EB29F50071F4FF /* SentryClientReport.m */,
7BD4BD4627EB2A3D0071F4FF /* SentryDiscardedEvent.h */,
7BD4BD4827EB2A5D0071F4FF /* SentryDiscardedEvent.m */,
7BC9A20128F41350001E7C4C /* SentryMeasurementUnit.h */,
7BC9A20528F41781001E7C4C /* SentryMeasurementUnit.m */,
);
name = Protocol;
sourceTree = "<group>";
Expand Down Expand Up @@ -2243,6 +2253,7 @@
7B68D93525FF5F1A0082D139 /* SentryAppState+Equality.m */,
7BD4BD4A27EB2DC20071F4FF /* SentryDiscardedEventTests.swift */,
7BD4BD4C27EB31820071F4FF /* SentryClientReportTests.swift */,
7B68345028F7EB3D00FB7064 /* SentryMeasurementUnitTests.swift */,
);
path = Protocol;
sourceTree = "<group>";
Expand Down Expand Up @@ -2753,7 +2764,6 @@
8ECC674525C23A20000E2BF6 /* SentrySpanId.m */,
8E4E7C6B25DAAAFE006AB9E2 /* SentryTransaction.h */,
8ECC674425C23A1F000E2BF6 /* SentryTransaction.m */,
7B6C5ED0264E5D6C0010D138 /* SentryTransaction+Private.h */,
8ECC673B25C23996000E2BF6 /* SentryTransactionContext.h */,
8ECC674625C23A20000E2BF6 /* SentryTransactionContext.m */,
0A56DA5E28ABA01B00C400D5 /* SentryTransactionContext+Private.h */,
Expand All @@ -2773,6 +2783,8 @@
D88817D626D7149100BF2251 /* SentryTraceContext.m */,
D8603DD7284F894C000E1227 /* SentryBaggage.h */,
D8603DD4284F8497000E1227 /* SentryBaggage.m */,
7BC9A1FF28F41016001E7C4C /* SentryMeasurementValue.h */,
7BC9A20328F4166D001E7C4C /* SentryMeasurementValue.m */,
);
name = Transaction;
sourceTree = "<group>";
Expand Down Expand Up @@ -2895,6 +2907,7 @@
0A2D8DA8289BC905008720F6 /* SentryViewHierarchy.h in Headers */,
8EAE980C261E9F530073B6B3 /* SentryUIViewControllerPerformanceTracker.h in Headers */,
63FE717D20DA4C1100CDBAE8 /* SentryCrashCachedData.h in Headers */,
7BC9A20028F41016001E7C4C /* SentryMeasurementValue.h in Headers */,
7BBC826D25DFCFDE005F1ED8 /* SentryInAppLogic.h in Headers */,
03BCC38A27E1BF49003232C7 /* SentryTime.h in Headers */,
7B0A54222521C21E00A71716 /* SentryFrameRemover.h in Headers */,
Expand Down Expand Up @@ -2987,6 +3000,7 @@
7DC27EC523997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.h in Headers */,
63FE707F20DA4C1000CDBAE8 /* SentryCrashVarArgs.h in Headers */,
03F84D2627DD414C008FE43F /* SentryThreadMetadataCache.hpp in Headers */,
7BC9A20228F41350001E7C4C /* SentryMeasurementUnit.h in Headers */,
7BB654FB253DC14A00887E87 /* SentryUserFeedback.h in Headers */,
7B8ECBFA26498907005FE2EF /* SentryAppStateManager.h in Headers */,
639FCFA01EBC804600778193 /* SentryException.h in Headers */,
Expand Down Expand Up @@ -3040,7 +3054,6 @@
8E5D38E3261D4B57000D363D /* SentryPerformanceTrackingIntegration.h in Headers */,
63FE70F920DA4C1000CDBAE8 /* SentryCrashMonitor.h in Headers */,
7B98D7CB25FB64EC00C5A389 /* SentryOutOfMemoryTrackingIntegration.h in Headers */,
7B6C5ED2264E5D6C0010D138 /* SentryTransaction+Private.h in Headers */,
63FE710920DA4C1000CDBAE8 /* SentryCrashFileUtils.h in Headers */,
03F84D1F27DD414C008FE43F /* SentryAsyncSafeLogging.h in Headers */,
7BE3C76B2445C27A00A38442 /* SentryCurrentDateProvider.h in Headers */,
Expand Down Expand Up @@ -3414,6 +3427,7 @@
8EAE9806261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m in Sources */,
D88817D826D7149100BF2251 /* SentryTraceContext.m in Sources */,
8EBF870926140D37001A6853 /* SentryPerformanceTracker.m in Sources */,
7BC9A20428F4166D001E7C4C /* SentryMeasurementValue.m in Sources */,
D859696B27BECD8F0036A46E /* SentryCoreDataTrackingIntegration.m in Sources */,
7BD86EC7264A641D005439DB /* SentrySysctl.m in Sources */,
D859697327BECDD20036A46E /* SentryCoreDataSwizzling.m in Sources */,
Expand All @@ -3430,6 +3444,7 @@
0356A571288B4612008BF593 /* SentryProfilesSampler.m in Sources */,
63FE710B20DA4C1000CDBAE8 /* SentryCrashMach.c in Sources */,
63FE707720DA4C1000CDBAE8 /* Container+SentryDeepSearch.m in Sources */,
7BC9A20628F41781001E7C4C /* SentryMeasurementUnit.m in Sources */,
63FE71A020DA4C1100CDBAE8 /* SentryCrashInstallation.m in Sources */,
63FE713520DA4C1100CDBAE8 /* SentryCrashMemory.c in Sources */,
63FE714520DA4C1100CDBAE8 /* SentryCrashObjC.c in Sources */,
Expand Down Expand Up @@ -3462,6 +3477,7 @@
7B5AB65D27E48E5200F1D1BA /* TestThreadInspector.swift in Sources */,
7BF9EF742722A85B00B5BBEF /* SentryClassRegistrator.m in Sources */,
63B819141EC352A7002FDF4C /* SentryInterfacesTests.m in Sources */,
7B68345128F7EB3D00FB7064 /* SentryMeasurementUnitTests.swift in Sources */,
7B14089A248791660035403D /* SentryCrashStackEntryMapperTests.swift in Sources */,
7B869EBC249B91D8004F4FDB /* SentryDebugMetaEquality.swift in Sources */,
7B01CE3D271993AC00B5AF31 /* SentryTransportFactoryTests.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Sources/Sentry/Public/Sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
#import "SentryHub.h"
#import "SentryId.h"
#import "SentryIntegrationProtocol.h"
#import "SentryMeasurementUnit.h"
#import "SentryMechanism.h"
#import "SentryMechanismMeta.h"
#import "SentryMessage.h"
Expand Down
Loading

0 comments on commit fdbae9f

Please sign in to comment.