Skip to content

Commit 044cc5a

Browse files
authored
Merge pull request #338 from bugsnag/release-v1.10.1
Release v1.10.1
2 parents d077f76 + 84fae95 commit 044cc5a

12 files changed

+35
-15
lines changed

.jazzy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ author_url: "https://www.bugsnag.com"
22
author: "Bugsnag Inc"
33
clean: false # avoid deleting docs/.git
44
framework_root: "BugsnagPerformance"
5-
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa-performance/tree/v1.10.0/Bugsnag"
5+
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa-performance/tree/v1.10.1/Bugsnag"
66
github_url: "https://github.com/bugsnag/bugsnag-cocoa-performance"
77
hide_documentation_coverage: true
88
module: "BugsnagPerformance"
9-
module_version: "1.10.0"
9+
module_version: "1.10.1"
1010
objc: true
1111
output: "docs"
1212
readme: "README.md"

BugsnagPerformance.podspec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "BugsnagPerformance",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"summary": "The Bugsnag performance monitoring framework for iOS.",
55
"homepage": "https://github.com/bugsnag/bugsnag-cocoa-performance",
66
"license": {
@@ -12,7 +12,7 @@
1212
},
1313
"source": {
1414
"git": "https://github.com/bugsnag/bugsnag-cocoa-performance.git",
15-
"tag": "v1.10.0"
15+
"tag": "v1.10.1"
1616
},
1717
"platforms": {
1818
"ios": "13.0"

BugsnagPerformanceSwift.podspec.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "BugsnagPerformanceSwift",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"summary": "The Bugsnag performance monitoring framework for Swift-only functionality in iOS.",
55
"homepage": "https://github.com/bugsnag/bugsnag-cocoa-performance",
66
"license": {
@@ -13,7 +13,7 @@
1313
"swift_version": "4.2",
1414
"source": {
1515
"git": "https://github.com/bugsnag/bugsnag-cocoa-performance.git",
16-
"tag": "v1.10.0"
16+
"tag": "v1.10.1"
1717
},
1818
"platforms": {
1919
"ios": "13.0"
@@ -24,6 +24,6 @@
2424
"SwiftUI"
2525
],
2626
"dependencies": {
27-
"BugsnagPerformance": "1.10.0"
27+
"BugsnagPerformance": "1.10.1"
2828
}
2929
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
## 1.10.1 (2024-10-30)
5+
6+
### Bug fixes
7+
8+
* Set bugsnag.span.category to 'custom' for custom spans.
9+
[336](https://github.com/bugsnag/bugsnag-cocoa-performance/pull/336)
10+
411
## 1.10.0 (2024-09-30)
512

613
### Enhancements

Sources/BugsnagPerformance/Private/BugsnagPerformanceImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class BugsnagPerformanceImpl: public PhasedStartup {
4545

4646
void reportNetworkSpan(NSURLSessionTask *task, NSURLSessionTaskMetrics *metrics) noexcept;
4747

48-
BugsnagPerformanceSpan *startSpan(NSString *name) noexcept;
48+
BugsnagPerformanceSpan *startCustomSpan(NSString *name) noexcept;
4949

50-
BugsnagPerformanceSpan *startSpan(NSString *name, BugsnagPerformanceSpanOptions *options) noexcept;
50+
BugsnagPerformanceSpan *startCustomSpan(NSString *name, BugsnagPerformanceSpanOptions *options) noexcept;
5151

5252
BugsnagPerformanceSpan *startViewLoadSpan(NSString *name, BugsnagPerformanceViewType viewType) noexcept;
5353

Sources/BugsnagPerformance/Private/BugsnagPerformanceImpl.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,15 +485,17 @@
485485

486486
#pragma mark Spans
487487

488-
BugsnagPerformanceSpan *BugsnagPerformanceImpl::startSpan(NSString *name) noexcept {
488+
BugsnagPerformanceSpan *BugsnagPerformanceImpl::startCustomSpan(NSString *name) noexcept {
489489
SpanOptions options;
490490
auto span = tracer_->startCustomSpan(name, options);
491+
[span internalSetMultipleAttributes:spanAttributesProvider_->customSpanAttributes()];
491492
return span;
492493
}
493494

494-
BugsnagPerformanceSpan *BugsnagPerformanceImpl::startSpan(NSString *name, BugsnagPerformanceSpanOptions *optionsIn) noexcept {
495+
BugsnagPerformanceSpan *BugsnagPerformanceImpl::startCustomSpan(NSString *name, BugsnagPerformanceSpanOptions *optionsIn) noexcept {
495496
auto options = SpanOptions(optionsIn);
496497
auto span = tracer_->startCustomSpan(name, options);
498+
[span internalSetMultipleAttributes:spanAttributesProvider_->customSpanAttributes()];
497499
return span;
498500
}
499501

Sources/BugsnagPerformance/Private/SpanAttributesProvider.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SpanAttributesProvider {
2222
NSMutableDictionary *viewLoadSpanAttributes(NSString *className, BugsnagPerformanceViewType viewType) noexcept;
2323
NSMutableDictionary *preloadedViewLoadSpanAttributes(NSString *className, BugsnagPerformanceViewType viewType) noexcept;
2424
NSMutableDictionary *viewLoadPhaseSpanAttributes(NSString *className, NSString *phase) noexcept;
25+
NSMutableDictionary *customSpanAttributes() noexcept;
2526

2627
static NSString *httpUrlAttributeKey();
2728
};

Sources/BugsnagPerformance/Private/SpanAttributesProvider.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,10 @@ static void addNonZero(NSMutableDictionary *dict, NSString *key, NSNumber *value
188188
@"bugsnag.phase": phase,
189189
}.mutableCopy;
190190
}
191+
192+
NSMutableDictionary *
193+
SpanAttributesProvider::customSpanAttributes() noexcept {
194+
return @{
195+
@"bugsnag.span.category": @"custom",
196+
}.mutableCopy;
197+
}

Sources/BugsnagPerformance/Private/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
#pragma once
1010

1111
#define TELEMETRY_SDK_NAME "bugsnag.performance.cocoa"
12-
#define TELEMETRY_SDK_VERSION "1.10.0"
12+
#define TELEMETRY_SDK_VERSION "1.10.1"

Sources/BugsnagPerformance/Public/BugsnagPerformance.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ + (void)startWithConfiguration:(BugsnagPerformanceConfiguration *)configuration
2727
}
2828

2929
+ (BugsnagPerformanceSpan *)startSpanWithName:(NSString *)name {
30-
return BugsnagPerformanceLibrary::getBugsnagPerformanceImpl()->startSpan(name);
30+
return BugsnagPerformanceLibrary::getBugsnagPerformanceImpl()->startCustomSpan(name);
3131
}
3232

3333
+ (BugsnagPerformanceSpan *)startSpanWithName:(NSString *)name options:(BugsnagPerformanceSpanOptions *)options {
34-
return BugsnagPerformanceLibrary::getBugsnagPerformanceImpl()->startSpan(name, options);
34+
return BugsnagPerformanceLibrary::getBugsnagPerformanceImpl()->startCustomSpan(name, options);
3535
}
3636

3737
+ (BugsnagPerformanceSpan *)startViewLoadSpanWithName:(NSString *)name viewType:(BugsnagPerformanceViewType)viewType {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.0
1+
1.10.1

features/default/manual_spans.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Feature: Manual creation of spans
1515
* a span field "name" equals "WillRetry"
1616
* a span field "name" equals "Success"
1717
* every span bool attribute "bugsnag.span.first_class" is true
18+
* every span string attribute "bugsnag.span.category" equals "custom"
1819

1920
Scenario: Manually start and end a span
2021
Given I run "ManualSpanScenario"
@@ -47,6 +48,7 @@ Feature: Manual creation of spans
4748
* the trace payload field "resourceSpans.0.resource" string attribute "service.version" equals "10.0"
4849
* the trace payload field "resourceSpans.0.resource" string attribute "telemetry.sdk.name" equals "bugsnag.performance.cocoa"
4950
* the trace payload field "resourceSpans.0.resource" string attribute "telemetry.sdk.version" matches the regex "[0-9]+\.[0-9]+\.[0-9]+"
51+
* every span string attribute "bugsnag.span.category" equals "custom"
5052

5153
Scenario: Starting and ending a span before starting the SDK
5254
Given I run "ManualSpanBeforeStartScenario"
@@ -65,6 +67,7 @@ Feature: Manual creation of spans
6567
* the trace payload field "resourceSpans.0.resource" string attribute "telemetry.sdk.version" matches the regex "[0-9]+\.[0-9]+\.[0-9]+"
6668
* the trace payload field "resourceSpans.0.resource" string attribute "bugsnag.app.bundle_version" equals "42.42"
6769
* the trace payload field "resourceSpans.0.resource" string attribute "service.version" equals "42"
70+
* every span string attribute "bugsnag.span.category" equals "custom"
6871

6972
Scenario: Manually report a view load span
7073
Given I run "ManualViewLoadScenario"

0 commit comments

Comments
 (0)