Skip to content

Commit 5aa7f81

Browse files
TheHighriseropenkitdt
authored andcommitted
Pull request #259: RUM-10777 Change sendBizEvent behavior
Merge in OP/openkit-java from feature/RUM-10777-openkit-sendbizevent-is-not-checking-against-the-correct-datacollectionlevel to main * commit '8c76183094a9011eb4578aa15c389025842c7a09': RUM-10777 Forgot java7 test RUM-10777 Change sendBizEvent behavior GitOrigin-RevId: 9843be93dd2d946517468724e39e18074e0bc1e6
1 parent 519fb00 commit 5aa7f81

File tree

4 files changed

+3
-32
lines changed

4 files changed

+3
-32
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [Unreleased](https://github.com/Dynatrace/openkit-java/compare/v3.1.0...HEAD)
44

5+
### Changed
6+
- `Session.sendBizEvent` will always send an event regardless of the `DataCollectionLevel`
7+
58
## 3.1.0 [Release date: 2023-06-05]
69
[GitHub Releases](https://github.com/Dynatrace/openkit-java/releases/tag/v3.1.0)
710

src/main/java/com/dynatrace/openkit/protocol/Beacon.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,10 +891,6 @@ public void sendBizEvent(String type, Map<String, JSONValue> attributes) {
891891
throw new IllegalArgumentException("type is null or empty");
892892
}
893893

894-
if (!configuration.getPrivacyConfiguration().isEventReportingAllowed()) {
895-
return;
896-
}
897-
898894
if (!isDataCapturingEnabled()) {
899895
return;
900896
}

src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,20 +1620,6 @@ public void sendBizEventWithNullPayload() {
16201620
);
16211621
}
16221622

1623-
@Test
1624-
public void sendBizEventIsNotReportedIfEventReportingDisallowed() {
1625-
// given
1626-
Beacon target = createBeacon().build();
1627-
when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false);
1628-
HashMap<String, JSONValue> attributes = new HashMap<>();
1629-
1630-
// when
1631-
target.sendBizEvent("EventType", attributes);
1632-
1633-
// then ensure nothing has been serialized
1634-
verifyNoInteractions(mockBeaconCache);
1635-
}
1636-
16371623
@Test
16381624
public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() {
16391625
// given

src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,20 +1619,6 @@ public void sendBizEventWithNullPayload() {
16191619
);
16201620
}
16211621

1622-
@Test
1623-
public void sendBizEventIsNotReportedIfEventReportingDisallowed() {
1624-
// given
1625-
Beacon target = createBeacon().build();
1626-
when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false);
1627-
HashMap<String, JSONValue> attributes = new HashMap<>();
1628-
1629-
// when
1630-
target.sendBizEvent("EventType", attributes);
1631-
1632-
// then ensure nothing has been serialized
1633-
verifyZeroInteractions(mockBeaconCache);
1634-
}
1635-
16361622
@Test
16371623
public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() {
16381624
// given

0 commit comments

Comments
 (0)