Skip to content

Commit

Permalink
Fix analytics data of template endpoints publishing twice
Browse files Browse the repository at this point in the history
  • Loading branch information
DedunuKarunarathne committed Feb 16, 2024
1 parent 564af81 commit 5ab5719
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,7 @@ public class TemplateEndpoint extends AbstractEndpoint {

@Override
public void send(MessageContext synCtx) {
if (RuntimeStatisticCollector.isStatisticsEnabled()) {
Integer currentIndex = null;
if (getDefinition() != null) {
currentIndex = OpenEventCollector.reportChildEntryEvent(synCtx, getReportingName(),
ComponentType.ENDPOINT, getDefinition().getAspectConfiguration(), true);
}
try {
sendMessage(synCtx);
} finally {
if (currentIndex != null) {
CloseEventCollector.closeEntryEvent(synCtx, getReportingName(), ComponentType.MEDIATOR,
currentIndex, false);
}
}
} else {
sendMessage(synCtx);
}
sendMessage(synCtx);
}

@Override
Expand Down

0 comments on commit 5ab5719

Please sign in to comment.