Skip to content
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

Replace internal access to traceId property with traceIdHi and traceIdLo #362

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

yousif-bugsnag
Copy link
Contributor

Goal

Methods/properties that return a struct (such as traceId in BugsnagPerformanceSpanContext) cannot be proxied in the CrossTalk API and would crash if accessed through a proxy object.

This PR adds two new properties for traceIDHi and traceIdLo to BugsnagPerformanceSpanContext and updates internal code to never access traceId on a span or span context and use these new properties instead.

Testing

Relied on existing tests

Copy link

BugsnagPerformance.framework binary size increased by 320 bytes from 524,168 to 524,488

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0 +13e3% +15.7Ki    [__LINKEDIT]
  +0.2%    +192  +0.2%    +192    Symbol Table
  +0.1%    +128  +0.1%    +128    String Table
  +0.1%     +84  +0.1%     +84    __TEXT,__text
  +0.4%     +80  +0.4%     +80    __DATA,__objc_const
  +0.5%     +64  +0.5%     +64    __TEXT,__objc_stubs
  +0.2%     +27  +0.2%     +27    __TEXT,__objc_methname
  +0.5%     +16  +0.5%     +16    __DATA,__objc_selrefs
  +0.2%      +8  +0.2%      +8    __TEXT,__unwind_info
  -0.1%      -8  -0.1%      -8    __TEXT,__gcc_except_tab
  -1.6%     -96  -1.6%     -96    [__DATA]
  -0.4%    -175  -0.4%    -175    [__TEXT]
  +0.1%    +320  +3.1% +16.0Ki    TOTAL

Generated by 🚫 Danger

kstenerud
kstenerud previously approved these changes Dec 12, 2024
Sources/BugsnagPerformance/Private/OtlpTraceEncoding.mm Outdated Show resolved Hide resolved
@yousif-bugsnag yousif-bugsnag merged commit 9bec60b into next Dec 12, 2024
25 checks passed
@yousif-bugsnag yousif-bugsnag deleted the PLAT-13306/span-context-traceid branch December 12, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants