diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d423fe4..4e8b87f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased](https://github.com/Dynatrace/openkit-java/compare/v3.1.0...HEAD) +### Changed +- `Session.sendBizEvent` will always send an event regardless of the `DataCollectionLevel` + ## 3.1.0 [Release date: 2023-06-05] [GitHub Releases](https://github.com/Dynatrace/openkit-java/releases/tag/v3.1.0) diff --git a/src/main/java/com/dynatrace/openkit/protocol/Beacon.java b/src/main/java/com/dynatrace/openkit/protocol/Beacon.java index ecdcc0f4..1f6ad90f 100644 --- a/src/main/java/com/dynatrace/openkit/protocol/Beacon.java +++ b/src/main/java/com/dynatrace/openkit/protocol/Beacon.java @@ -891,10 +891,6 @@ public void sendBizEvent(String type, Map attributes) { throw new IllegalArgumentException("type is null or empty"); } - if (!configuration.getPrivacyConfiguration().isEventReportingAllowed()) { - return; - } - if (!isDataCapturingEnabled()) { return; } diff --git a/src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java b/src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java index 90080f08..f3de7056 100644 --- a/src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java +++ b/src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java @@ -1620,20 +1620,6 @@ public void sendBizEventWithNullPayload() { ); } - @Test - public void sendBizEventIsNotReportedIfEventReportingDisallowed() { - // given - Beacon target = createBeacon().build(); - when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false); - HashMap attributes = new HashMap<>(); - - // when - target.sendBizEvent("EventType", attributes); - - // then ensure nothing has been serialized - verifyNoInteractions(mockBeaconCache); - } - @Test public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() { // given diff --git a/src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java b/src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java index ebeb0c96..55ff083c 100644 --- a/src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java +++ b/src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java @@ -1619,20 +1619,6 @@ public void sendBizEventWithNullPayload() { ); } - @Test - public void sendBizEventIsNotReportedIfEventReportingDisallowed() { - // given - Beacon target = createBeacon().build(); - when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false); - HashMap attributes = new HashMap<>(); - - // when - target.sendBizEvent("EventType", attributes); - - // then ensure nothing has been serialized - verifyZeroInteractions(mockBeaconCache); - } - @Test public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() { // given