Skip to content

Commit

Permalink
Merge branch 'main' into lcian/feat/spring-profiles-event-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
lcian authored Feb 20, 2025
2 parents 4160f03 + 4c80d9e commit f723d1c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Features

- The `ignoredErrors` option is now configurable via the manifest property `io.sentry.traces.ignored-errors` ([#4178](https://github.com/getsentry/sentry-java/pull/4178))
- A list of active Spring profiles is attached to the trace context and displayed in the Sentry UI when using our Spring or Spring Boot integrations ([#4147](https://github.com/getsentry/sentry-java/pull/4147))
- This consists of an empty list when only the default profile is active

Expand Down Expand Up @@ -119,7 +120,11 @@ Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes.
- New `Scope` types have been introduced, see "Behavioural Changes" for more details.
- Lifecycle tokens have been introduced to manage `Scope` lifecycle, see "Behavioural Changes" for more details.
- Bumping `minSdk` level to 21 (Android 5.0)
- Our `sentry-opentelemetry-agent` has been improved and now works in combination with the rest of Sentry. You may now mix and match OpenTelemetry and Sentry API for instrumenting your application.
- Our `sentry-opentelemetry-agent` has been improved and now works in combination with the rest of Sentry. You may now combine OpenTelemetry and Sentry for instrumenting your application.
- You may now use both OpenTelemetry SDK and Sentry SDK to capture transactions and spans. They can also be mixed and end up on the same transaction.
- OpenTelemetry extends the Sentry SDK by adding spans for numerous integrations, like Ktor, Vert.x and MongoDB. Please check [the OpenTelemetry GitHub repository](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation) for a full list.
- OpenTelemetry allows propagating trace information from and to additional libraries, that Sentry did not support before, for example gRPC.
- OpenTelemetry also has broader support for propagating the Sentry `Scopes` through reactive libraries like RxJava.
- The SDK is now compatible with Spring Boot 3.4
- We now support GraphQL v22 (`sentry-graphql-22`)
- Metrics have been removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ final class ManifestMetadataReader {

static final String MAX_BREADCRUMBS = "io.sentry.max-breadcrumbs";

static final String IGNORED_ERRORS = "io.sentry.ignored-errors";

/** ManifestMetadataReader ctor */
private ManifestMetadataReader() {}

Expand Down Expand Up @@ -400,6 +402,8 @@ static void applyMetadata(
options
.getSessionReplay()
.setMaskAllImages(readBool(metadata, logger, REPLAYS_MASK_ALL_IMAGES, true));

options.setIgnoredErrors(readList(metadata, logger, IGNORED_ERRORS));
}

options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.os.Bundle
import androidx.core.os.bundleOf
import androidx.test.ext.junit.runners.AndroidJUnit4
import io.sentry.FilterString
import io.sentry.ILogger
import io.sentry.SentryLevel
import io.sentry.SentryReplayOptions
Expand Down Expand Up @@ -1433,4 +1434,17 @@ class ManifestMetadataReaderTest {
// Assert
assertEquals(100, fixture.options.maxBreadcrumbs)
}

@Test
fun `applyMetadata reads ignoredErrors to options and sets the value if found`() {
// Arrange
val bundle = bundleOf(ManifestMetadataReader.IGNORED_ERRORS to "Some error,Another .*")
val context = fixture.getContext(metaData = bundle)

// Act
ManifestMetadataReader.applyMetadata(context, fixture.options, fixture.buildInfoProvider)

// Assert
assertEquals(listOf(FilterString("Some error"), FilterString("Another .*")), fixture.options.ignoredErrors)
}
}

0 comments on commit f723d1c

Please sign in to comment.