Class PepysActivityObserverConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, CatalogTargetFactory, IntegrationConnector, OpenMetadataTopicListener

public class PepysActivityObserverConnector extends DynamicIntegrationConnectorBase implements OpenMetadataTopicListener
PepysActivityObserverConnector keeps a diary of the activity around the anchor elements (assets, digital products and glossary terms) in the open metadata ecosystem, in the manner of Samuel Pepys. Its catalog targets are the topics that the OMAG Servers write their audit logs to (registered by the OMAG Server Platform Cataloguer). It listens to each of them for the anchor element activity messages (METADATA-OBSERVABILITY-0002 to -0009 and -0011) and maintains the separate counts in the UsageActivity classification of the anchor element named in each message.

The activity is gathered in memory as the records arrive and written on each refresh, so an element that is busy costs one read and one update per refresh rather than one per record. Counts that could not be written are kept and tried again on the next refresh.

The activity of the users whose userIds match one of the patterns in the ignoredUserIdPatterns configuration property is not counted. The core content pack sets them to match the non-personal accounts (ending in npa) and the governance engines (ending in engine), so only the activity of people and external tools is recorded. The patterns are used rather than a list of userIds because the servers' userIds differ in each environment. The connector's own userId is always ignored, whether a pattern matches it or not - its reads and updates of the anchor elements are reported in the audit log too, and otherwise each update of a UsageActivity classification would be counted as more activity, without end.