Skip to content

Commit

Permalink
Pull request #259: RUM-10777 Change sendBizEvent behavior
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TheHighriser authored and openkitdt committed Jun 23, 2023
1 parent 519fb00 commit 5aa7f81
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 32 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/dynatrace/openkit/protocol/Beacon.java
Original file line number Diff line number Diff line change
Expand Up @@ -891,10 +891,6 @@ public void sendBizEvent(String type, Map<String, JSONValue> attributes) {
throw new IllegalArgumentException("type is null or empty");
}

if (!configuration.getPrivacyConfiguration().isEventReportingAllowed()) {
return;
}

if (!isDataCapturingEnabled()) {
return;
}
Expand Down
14 changes: 0 additions & 14 deletions src/test/java/com/dynatrace/openkit/protocol/BeaconTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1620,20 +1620,6 @@ public void sendBizEventWithNullPayload() {
);
}

@Test
public void sendBizEventIsNotReportedIfEventReportingDisallowed() {
// given
Beacon target = createBeacon().build();
when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false);
HashMap<String, JSONValue> attributes = new HashMap<>();

// when
target.sendBizEvent("EventType", attributes);

// then ensure nothing has been serialized
verifyNoInteractions(mockBeaconCache);
}

@Test
public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() {
// given
Expand Down
14 changes: 0 additions & 14 deletions src/test7/java/com/dynatrace/openkit/protocol/BeaconTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1619,20 +1619,6 @@ public void sendBizEventWithNullPayload() {
);
}

@Test
public void sendBizEventIsNotReportedIfEventReportingDisallowed() {
// given
Beacon target = createBeacon().build();
when(mockPrivacyConfiguration.isEventReportingAllowed()).thenReturn(false);
HashMap<String, JSONValue> attributes = new HashMap<>();

// when
target.sendBizEvent("EventType", attributes);

// then ensure nothing has been serialized
verifyZeroInteractions(mockBeaconCache);
}

@Test
public void sendBizEventIsNotReportedIfDataSendingIsDisallowed() {
// given
Expand Down

0 comments on commit 5aa7f81

Please sign in to comment.