Skip to content

Commit

Permalink
fix: Align core data span operations (#2222)
Browse files Browse the repository at this point in the history
Rename db.query to db.sql.query and db.transaction to
db.sql.transaction.
  • Loading branch information
philipphofmann authored Sep 26, 2022
1 parent 172c95a commit 074350f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ class SentryCoreDataTrackerTests: XCTestCase {

func testConstants() {
//Test constants to make sure we don't accidentally change it
XCTAssertEqual(SENTRY_COREDATA_FETCH_OPERATION, "db.query")
XCTAssertEqual(SENTRY_COREDATA_SAVE_OPERATION, "db.transaction")

XCTAssertEqual(SENTRY_COREDATA_FETCH_OPERATION, "db.sql.query")
XCTAssertEqual(SENTRY_COREDATA_SAVE_OPERATION, "db.sql.transaction")
}

func testFetchRequest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class SentryCoreDataTrackingIntegrationTests: XCTestCase {
try? stack.managedObjectContext.save()

XCTAssertEqual(transaction.children.count, 1)
XCTAssertEqual(transaction.children[0].context.operation, "db.transaction")
XCTAssertEqual(transaction.children[0].context.operation, "db.sql.transaction")
}

func test_Save_noChanges() {
Expand Down

0 comments on commit 074350f

Please sign in to comment.