Skip to content

add sentry-okhttp module #3005

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

Merged
merged 7 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ targets:
maven:io.sentry:sentry-jdbc:
maven:io.sentry:sentry-graphql:
maven:io.sentry:sentry-quartz:
# maven:io.sentry:sentry-okhttp:
maven:io.sentry:sentry-android-navigation:
maven:io.sentry:sentry-compose:
maven:io.sentry:sentry-compose-android:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- sentry-quartz
- sentry-openfeign
- sentry-apache-http-client-5
- sentry-okhttp
- other
validations:
required: true
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased

### Features

- Add `sentry-okhttp` module to support instrumenting OkHttp in non-Android projects ([#3005](https://github.com/getsentry/sentry-java/pull/3005))
- This deprecates `sentry-android-okhttp` classes. Make sure to replace `io.sentry.android.okhttp` package name with `io.sentry.okhttp` before the next major, where the classes will be removed
- `SentryOkHttpUtils` was removed from public API as it's been exposed by mistake

## 7.0.0-rc.1

### Features
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ object Config {
val SENTRY_SERVLET_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.servlet"
val SENTRY_SERVLET_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.servlet.jakarta"
val SENTRY_COMPOSE_HELPER_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.compose.helper"
val SENTRY_OKHTTP_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.okhttp"
val group = "io.sentry"
val description = "SDK for sentry.io"
val versionNameProp = "versionName"
Expand Down
9 changes: 0 additions & 9 deletions sentry-android-okhttp/api/sentry-android-okhttp.api
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public final class io/sentry/android/okhttp/BuildConfig {
}

public final class io/sentry/android/okhttp/SentryOkHttpEventListener : okhttp3/EventListener {
public static final field Companion Lio/sentry/android/okhttp/SentryOkHttpEventListener$Companion;
public fun <init> ()V
public fun <init> (Lio/sentry/IHub;Lkotlin/jvm/functions/Function1;)V
public synthetic fun <init> (Lio/sentry/IHub;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down Expand Up @@ -48,9 +47,6 @@ public final class io/sentry/android/okhttp/SentryOkHttpEventListener : okhttp3/
public fun secureConnectStart (Lokhttp3/Call;)V
}

public final class io/sentry/android/okhttp/SentryOkHttpEventListener$Companion {
}

public final class io/sentry/android/okhttp/SentryOkHttpInterceptor : okhttp3/Interceptor {
public fun <init> ()V
public fun <init> (Lio/sentry/IHub;)V
Expand All @@ -64,8 +60,3 @@ public abstract interface class io/sentry/android/okhttp/SentryOkHttpInterceptor
public abstract fun execute (Lio/sentry/ISpan;Lokhttp3/Request;Lokhttp3/Response;)Lio/sentry/ISpan;
}

public final class io/sentry/android/okhttp/SentryOkHttpUtils {
public static final field INSTANCE Lio/sentry/android/okhttp/SentryOkHttpUtils;
public final fun captureClientError (Lio/sentry/IHub;Lokhttp3/Request;Lokhttp3/Response;)V
}

5 changes: 2 additions & 3 deletions sentry-android-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ android {

buildTypes {
getByName("debug")
getByName("release") {
consumerProguardFiles("proguard-rules.pro")
}
getByName("release")
}

kotlinOptions {
Expand Down Expand Up @@ -63,6 +61,7 @@ kotlin {

dependencies {
api(projects.sentry)
api(projects.sentryOkhttp)

compileOnly(Config.Libs.okhttp)

Expand Down
Loading