Open amerireza opened 5 years ago
Yes. This component was developed in relation to the requirement explained in this article. So it only extracts a few fields from the PublishingFlow which are needed to build the visualizations in Kibana.
It can be improved to extract everything you have mentioned, as it is done here. https://github.com/ThejanRupasinghe/ei-elastic-custom-publisher/blob/d141e40c4757900df9c8562b280ee1fb8419229b/src/main/java/org/wso2/custom/elastic/publisher/publish/ElasticStatisticsPublisher.java#L62-L107
OK, I wanna add other event types but I don't know how can I see all types. What is the abstract or parent class of these all event types?
PublishingFlow from wso2-synapse is intercepted in the above shown code. It has an array of PublishingEvents, which the message flow has gone through. You can iterate through it and extract the needed fields.
Thank you for the information. But the componentIndex
variable is private and eventTimestamp
variables are not existing in the PublishingEvents.java
class.
Yes. componentIndex
is private, but can access event related times from here.
ElasticMediationFlowObserver is written using the MessageFlowObserver interface exposed by the EI Analytics profile, so this is the only visibility we have here.
What do you say, if we add a getter
for the componentIndex
in the PublishingEvent.java
to be able to retrieve the value, in the next versions?
Yes. We with that change we should be able to access componentIndex
here.
I am using this component and it works well but, I can see so many data when I use ei-analytics but published data from ei-elastic publisher is just a few of them. These are fields I get when I use ei-analytics.
metaTenantId | messageFlowId | host | hashCode | componentName | componentType | componentIndex | componentId | startTime | endTime | duration | beforePayload | afterPayload | contextPropertyMap | transportPropertyMap | children | entryPoint | entryPointHashcode | faultCount | eventTimestamp