Skip to content

Commit 43f8cd2

Browse files
authored
Merge branch 'next' into dependabot/github_actions/gradle/actions-5.0.0
2 parents 65f01dc + 2b46b1b commit 43f8cd2

File tree

70 files changed

+1486
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1486
-280
lines changed

.buildkite/pipeline.yml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ steps:
4949
JAVA_VERSION: '17'
5050
command: scripts/run-sizer.sh
5151

52+
- label: ':android: Build Example App'
53+
timeout_in_minutes: 10
54+
agents:
55+
queue: macos-15
56+
command: 'make example-app'
57+
env:
58+
JAVA_VERSION: 17
59+
5260
- label: ':android: Build and upload test fixture'
5361
key: 'fixture'
5462
timeout_in_minutes: 30
@@ -76,10 +84,13 @@ steps:
7684
- "ANDROID_13"
7785
- "ANDROID_14"
7886
- "ANDROID_15"
87+
- "ANDROID_16"
7988
plugins:
8089
artifacts#v1.9.0:
8190
download: "build/fixture_url.txt"
82-
upload: "maze_output/failed/**/*"
91+
upload:
92+
- "maze_output/failed/**/*"
93+
- "maze_output/maze_output.zip"
8394
docker-compose#v4.8.0:
8495
pull: android-maze-runner
8596
run: android-maze-runner
@@ -104,39 +115,11 @@ steps:
104115
concurrency_method: eager
105116
retry:
106117
automatic:
118+
- exit_status: -1 # Agent was lost
119+
limit: 2
107120
- exit_status: 103 # Appium session failed
108121
limit: 2
109122

110-
- label: ':browserstack: {{matrix}} tests'
111-
depends_on: "fixture"
112-
timeout_in_minutes: 60
113-
matrix:
114-
- "ANDROID_16"
115-
plugins:
116-
artifacts#v1.9.0:
117-
download: "build/fixture_bs_url.txt"
118-
upload: "maze_output/failed/**/*"
119-
docker-compose#v4.8.0:
120-
pull: android-maze-runner
121-
run: android-maze-runner
122-
service-ports: true
123-
command:
124-
- "features/full_tests"
125-
- "--app=@build/fixture_bs_url.txt"
126-
- "--farm=bs"
127-
- "--device={{matrix}}"
128-
- "--appium-version=1.22.0"
129-
- "--fail-fast"
130-
- "--app-activity=com.bugsnag.mazeracer.SplashScreenActivity"
131-
- "--app-package=com.bugsnag.mazeracer"
132-
test-collector#v1.10.2:
133-
files: "reports/TEST-*.xml"
134-
format: "junit"
135-
branch: "^main|next$$"
136-
concurrency: 5
137-
concurrency_group: 'browserstack-app'
138-
concurrency_method: eager
139-
140123
# If this is the 'main' branch activate a manual publishing step
141124

142125
- block: 'Trigger package publish'

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
steps:
4646
- name: Checkout repository
47-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
47+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd #v5.0.1
4848
with:
4949
submodules: recursive
5050
- uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 #v3.5.0
@@ -62,7 +62,7 @@ jobs:
6262

6363
# Initializes the CodeQL tools for scanning.
6464
- name: Initialize CodeQL
65-
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 #v3.30.5
65+
uses: github/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db #v4.31.3
6666
with:
6767
languages: ${{ matrix.language }}
6868
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -78,6 +78,6 @@ jobs:
7878
./gradlew --no-daemon assemble
7979
8080
- name: Perform CodeQL Analysis
81-
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 #v3.30.5
81+
uses: github/codeql-action/analyze@014f16e7ab1402f30e7c3329d33797e7948572db #v4.31.3
8282
with:
8383
category: "/language:${{matrix.language}}"

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
35+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3636
with:
3737
persist-credentials: false
3838

@@ -59,7 +59,7 @@ jobs:
5959
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6060
# format to the repository Actions tab.
6161
- name: "Upload artifact"
62-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
62+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6363
with:
6464
name: SARIF file
6565
path: results.sarif
@@ -68,13 +68,13 @@ jobs:
6868
# Upload the results to GitHub's code scanning dashboard (optional).
6969
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
71+
uses: github/codeql-action/upload-sarif@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
7272
with:
7373
sarif_file: results.sarif
7474

7575
gradle-wrapper-validation:
7676
name: "Checksum validation of Gradle Wrappers"
7777
runs-on: ubuntu-latest
7878
steps:
79-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
79+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
8080
- uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ captures/
1717

1818
# Mazerunner
1919
maze_output
20+
maze-runner.log
2021

2122
# Misc
2223
.DS_Store

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
## TBD
22

3+
### Changes
4+
5+
* System metrics are now reported for first-class `ViewLoad` spans
6+
[#475](https://github.com/bugsnag/bugsnag-android-performance/pull/475)
7+
8+
## 2.1.1 (2025-11-20)
9+
10+
### Bug fixes
11+
12+
* Made the new `ThreadAwareSpanContextStorage` interface public API
13+
[#474](https://github.com/bugsnag/bugsnag-android-performance/pull/474)
14+
15+
## 2.1.0 (2025-11-10)
16+
17+
### Changes
18+
19+
* Added an optional `spanName` to `LoadingIndicator` and `LoadingIndicatorView` to create a child span of the `ViewLoad` span
20+
[#458](https://github.com/bugsnag/bugsnag-android-performance/pull/458)
21+
* Introduced `GlobalSpanContextStorage` and `HybridSpanContextStorage` for more flexible trace parentage
22+
[#465](https://github.com/bugsnag/bugsnag-android-performance/pull/465)
23+
324
### Bug fixes
425

526
* `NamedSpanControlsPlugin` better handles timeouts when spans have duplicate names, avoiding holding references for longer than required

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source "https://rubygems.org"
77
gem 'bugsnag-maze-runner', '~>10.0'
88

99
# Or a branch
10-
#gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'integration/v8'
10+
#gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'main'
1111

1212
# Or follow master:
1313
# gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner'

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install test-fixture check bump
1+
.PHONY: check install test-fixture example-app bump
22

33
check:
44
@./gradlew --continue license detekt lint ktlintCheck test
@@ -15,6 +15,11 @@ benchmark-fixture: install
1515
@cd features/fixtures/benchmarks && ./gradlew assembleRelease -x check
1616
@cp features/fixtures/benchmarks/app/build/outputs/apk/release/app-release.apk build/benchmark-fixture.apk
1717

18+
example-app:
19+
@./gradlew assembleRelease publishToMavenLocal -x check
20+
# Build example app
21+
@cd ./examples/performance-example/ && ./gradlew clean assembleRelease
22+
1823
bump:
1924
ifneq ($(shell git diff --staged),)
2025
@git diff --staged

bugsnag-android-performance-api/api/bugsnag-android-performance-api.api

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ public final class com/bugsnag/android/performance/ViewType : java/lang/Enum {
309309
public static fun values ()[Lcom/bugsnag/android/performance/ViewType;
310310
}
311311

312+
public abstract interface class com/bugsnag/android/performance/context/ThreadAwareSpanContextStorage : com/bugsnag/android/performance/SpanContextStorage {
313+
public abstract fun getCurrentThreadSpanContextStorage ()Lcom/bugsnag/android/performance/SpanContextStorage;
314+
public abstract fun setCurrentThreadSpanContextStorage (Lcom/bugsnag/android/performance/SpanContextStorage;)V
315+
}
316+
312317
public abstract interface class com/bugsnag/android/performance/controls/AppStartSpanControl {
313318
public abstract fun clearType ()V
314319
public abstract fun setType (Ljava/lang/String;)V
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.bugsnag.android.performance.context
2+
3+
import com.bugsnag.android.performance.SpanContextStorage
4+
5+
/**
6+
* An extension of [SpanContextStorage] for implementations that can differentiate between
7+
* execution threads.
8+
*
9+
* This interface provides a contract for storage mechanisms that are "thread-aware". It does not
10+
* mandate that all operations are isolated per-thread, but rather for interacting with what might
11+
* be a thread-specific storage instance.
12+
*
13+
* Implementations can use this to provide advanced capabilities, such as allowing manual
14+
* propagation of a `SpanContext` stack from one thread to another.
15+
*
16+
* @see SpanContextStorage
17+
*/
18+
public interface ThreadAwareSpanContextStorage : SpanContextStorage {
19+
/**
20+
* Represents the [SpanContextStorage] for the currently executing thread, providing a
21+
* mechanism to retrieve or replace it.
22+
*
23+
* This property is intended for advanced use cases, such as manual context propagation
24+
* across asynchronous boundaries. For example, a caller could get the storage from a
25+
* parent thread and set it on a newly created child thread to ensure the span
26+
* hierarchy is correctly maintained.
27+
*
28+
* **Getter**: Retrieves a representation of the `SpanContextStorage` for the current thread.
29+
* This may be the actual storage instance, a proxy, or `null` if no context is
30+
* associated with the thread.
31+
*
32+
* **Setter**: Attempts to replace the `SpanContextStorage` for the current thread.
33+
* This should be used with caution, as it can lead to an inconsistent state if not
34+
* managed carefully.
35+
*/
36+
public var currentThreadSpanContextStorage: SpanContextStorage?
37+
}

bugsnag-android-performance-compose/api/bugsnag-android-performance-compose.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class com/bugsnag/android/performance/compose/ComposeModule : com/b
1818
}
1919

2020
public final class com/bugsnag/android/performance/compose/LoadingIndicatorKt {
21-
public static final fun LoadingIndicator (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
21+
public static final fun LoadingIndicator (Landroidx/compose/ui/Modifier;Ljava/lang/String;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
2222
}
2323

2424
public final class com/bugsnag/android/performance/compose/MeasuredComposableKt {

0 commit comments

Comments
 (0)