Skip to content

Commit

Permalink
Merge pull request #3118 from DedunuKarunarathne/master
Browse files Browse the repository at this point in the history
Template endpoint metrics in ELK Monitoring for Micro Integrator
  • Loading branch information
DedunuKarunarathne authored Feb 16, 2024
2 parents 99cab9a + 18b94b5 commit b7f70b0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,16 @@ private void publishEndpointAnalytics(PublishingEvent event) {
return;
}

Endpoint endpoint = event.getElasticMetadata().getEndpoint(event.getComponentName());
String placeholderName = "$name";
String componentName = event.getComponentName();

if (endpoint == null) {
if (SynapseConstants.ANONYMOUS_ENDPOINT.equals(componentName) || placeholderName.equals(componentName)) {
return;
}

ElasticDataSchemaElement analyticsPayload = generateAnalyticsObject(event, Endpoint.class);
ElasticDataSchemaElement endpointDetails = new ElasticDataSchemaElement();
endpointDetails.setAttribute(ElasticConstants.EnvelopDef.ENDPOINT_NAME, endpoint.getName());
endpointDetails.setAttribute(ElasticConstants.EnvelopDef.ENDPOINT_NAME, componentName);
analyticsPayload.setAttribute(ElasticConstants.EnvelopDef.ENDPOINT_DETAILS, endpointDetails);

publishAnalytic(analyticsPayload);
Expand Down

0 comments on commit b7f70b0

Please sign in to comment.