-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-native): support for starting native spans on ios #540
base: integration/rn-native-integration
Are you sure you want to change the base?
feat(react-native): support for starting native spans on ios #540
Conversation
Browser bundle sizeNPM build
CDN build
Code coverageCoverage values did not change👌. Total:
Generated against 5979437 on 4 December 2024 at 12:22:19 UTC |
85ddc0d
to
1b366b1
Compare
42f08bd
to
1b8f00e
Compare
1b366b1
to
7373858
Compare
adef590
to
e84642f
Compare
This reverts commit e84642f.
ce38a1b
to
6cc9a9d
Compare
6cc9a9d
to
5979437
Compare
NSMutableDictionary *span = [NSMutableDictionary new]; | ||
span[@"name"] = nativeSpan.name; | ||
span[@"id"] = [NSString stringWithFormat:@"%llx", nativeSpan.spanId]; | ||
span[@"traceId"] = [NSString stringWithFormat:@"%llx%llx", nativeSpan.traceId.hi, nativeSpan.traceId.lo]; | ||
span[@"startTime"] = [NSNumber numberWithDouble: [nativeSpan.startTime timeIntervalSince1970] * NSEC_PER_SEC]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we also need to add the first class property, or does that only matter for the native side?
@@ -381,7 +381,7 @@ function installCocoaPerformance() { | |||
const podfilePath = resolve(fixtureDir, 'ios/Podfile') | |||
let podfile = fs.readFileSync(podfilePath, 'utf8') | |||
|
|||
const performancePod = `pod 'BugsnagPerformance', :git => 'https://github.com/bugsnag/bugsnag-cocoa-performance.git', :branch => 'integration/react-native-integration'` | |||
const performancePod = `pod 'BugsnagPerformance', :git => 'https://github.com/bugsnag/bugsnag-cocoa-performance.git', :branch => 'ya/crosstalk-api-startspan-improvements'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure you won't miss it, but just a reminder to update this branch!
Goal
Add support for starting native spans on iOS - this is the iOS implementation of the
startNativeSpan
Turbo Module method added in #536Design
The Turbo Module method startNativeSpan starts a span in Cocoa Performance via the CrossTalk API method
startSpanV1
- this method accepts a span name as anNSString
and a set of span options as anNSDictionary
Updated the Turbo Module Spec to use the
UnsafeObject
type for native span options - this is required for backwards compatibility with the Old Architecture (otherwise codegen will generate a struct for the typed function parameter instead of usingNSDictionary
)Testing
Tested manually as this isn't used yet