Skip to content

Commit fe8ccb0

Browse files
committed
Merge branch '8.x.x' into feat/lazy-span-id-v8
# Conflicts: # CHANGELOG.md
2 parents 8a93fec + f237379 commit fe8ccb0

File tree

94 files changed

+2178
-759
lines changed

Some content is hidden

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

94 files changed

+2178
-759
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
gradle-home-cache-cleanup: true
4242

4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # pin@v2
44+
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # pin@v2
4545
with:
4646
languages: ${{ matrix.language }}
4747

@@ -55,4 +55,4 @@ jobs:
5555
./gradlew buildForCodeQL
5656
5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # pin@v2
58+
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # pin@v2

CHANGELOG.md

Lines changed: 75 additions & 52 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ Sentry SDK for Java and Android
5757
| sentry-opentelemetry-core | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-opentelemetry-core) |
5858
| sentry-okhttp | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-okhttp/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-okhttp) |
5959

60+
# Releases
6061

62+
This repo uses the following ways to release SDK updates:
63+
64+
- `Pre-release`: We create pre-releases (alpha, beta, RC,…) for larger and potentially more impactful changes, such as new features or major versions.
65+
- `Latest`: We continuously release major/minor/hotfix versions from the `main` branch. These releases go through all our internal quality gates and are very safe to use and intended to be the default for most teams.
66+
- `Stable`: We promote releases from `Latest` when they have been used in the field for some time and in scale, considering time since release, adoption, and other quality and stability metrics. These releases will be indicated on the releases page (https://github.com/getsentry/sentry-java/releases/) with the `Stable` suffix.
6167

6268
# Useful links and docs
6369

buildSrc/src/main/java/Config.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ object Config {
5353
val appCompat = "androidx.appcompat:appcompat:1.3.0"
5454
val timber = "com.jakewharton.timber:timber:4.7.1"
5555
val okhttp = "com.squareup.okhttp3:okhttp:$okHttpVersion"
56-
val leakCanary = "com.squareup.leakcanary:leakcanary-android:2.8.1"
56+
val leakCanary = "com.squareup.leakcanary:leakcanary-android:2.14"
5757
val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.3"
5858

5959
private val lifecycleVersion = "2.2.0"
@@ -148,8 +148,11 @@ object Config {
148148
val composeActivity = "androidx.activity:activity-compose:1.4.0"
149149
val composeFoundation = "androidx.compose.foundation:foundation:$composeVersion"
150150
val composeUi = "androidx.compose.ui:ui:$composeVersion"
151+
152+
val composeUiReplay = "androidx.compose.ui:ui:1.5.0" // Note: don't change without testing forwards compatibility
151153
val composeFoundationLayout = "androidx.compose.foundation:foundation-layout:$composeVersion"
152154
val composeMaterial = "androidx.compose.material3:material3:1.0.0-alpha13"
155+
val composeCoil = "io.coil-kt:coil-compose:2.0.0"
153156

154157
val apolloKotlin = "com.apollographql.apollo3:apollo-runtime:3.8.2"
155158

@@ -199,6 +202,7 @@ object Config {
199202
val hsqldb = "org.hsqldb:hsqldb:2.6.1"
200203
val javaFaker = "com.github.javafaker:javafaker:1.0.2"
201204
val msgpack = "org.msgpack:msgpack-core:0.9.8"
205+
val leakCanaryInstrumentation = "com.squareup.leakcanary:leakcanary-android-instrumentation:2.14"
202206
}
203207

204208
object QualityPlugins {

sentry-android-core/api/sentry-android-core.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ public final class io/sentry/android/core/BuildInfoProvider {
160160
}
161161

162162
public final class io/sentry/android/core/ContextUtils {
163+
public static fun getApplicationContext (Landroid/content/Context;)Landroid/content/Context;
163164
public static fun isForegroundImportance ()Z
164165
}
165166

sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public void onActivityCreated(
394394

395395
firstActivityCreated = true;
396396

397-
if (fullyDisplayedReporter != null) {
397+
if (performanceEnabled && ttfdSpan != null && fullyDisplayedReporter != null) {
398398
fullyDisplayedReporter.registerFullyDrawnListener(() -> onFullFrameDrawn(ttfdSpan));
399399
}
400400
}

sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ static void loadDefaultAndMetadataOptions(
9292
final @NotNull BuildInfoProvider buildInfoProvider) {
9393
Objects.requireNonNull(context, "The context is required.");
9494

95-
// it returns null if ContextImpl, so let's check for nullability
96-
if (context.getApplicationContext() != null) {
97-
context = context.getApplicationContext();
98-
}
95+
context = ContextUtils.getApplicationContext(context);
9996

10097
Objects.requireNonNull(options, "The options object is required.");
10198
Objects.requireNonNull(logger, "The ILogger object is required.");

sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public AndroidTransactionProfiler(
7575
final boolean isProfilingEnabled,
7676
final int profilingTracesHz,
7777
final @NotNull ISentryExecutorService executorService) {
78-
this.context = Objects.requireNonNull(context, "The application context is required");
78+
this.context =
79+
Objects.requireNonNull(
80+
ContextUtils.getApplicationContext(context), "The application context is required");
7981
this.logger = Objects.requireNonNull(logger, "ILogger is required");
8082
this.frameMetricsCollector =
8183
Objects.requireNonNull(frameMetricsCollector, "SentryFrameMetricsCollector is required");

sentry-android-core/src/main/java/io/sentry/android/core/AnrIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final class AnrIntegration implements Integration, Closeable {
3535
private final @NotNull AutoClosableReentrantLock startLock = new AutoClosableReentrantLock();
3636

3737
public AnrIntegration(final @NotNull Context context) {
38-
this.context = context;
38+
this.context = ContextUtils.getApplicationContext(context);
3939
}
4040

4141
/**

sentry-android-core/src/main/java/io/sentry/android/core/AnrV2EventProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public AnrV2EventProcessor(
9797
final @NotNull SentryAndroidOptions options,
9898
final @NotNull BuildInfoProvider buildInfoProvider,
9999
final @Nullable SecureRandom random) {
100-
this.context = context;
100+
this.context = ContextUtils.getApplicationContext(context);
101101
this.options = options;
102102
this.buildInfoProvider = buildInfoProvider;
103103
this.random = random;

0 commit comments

Comments
 (0)