Class AuditSerdeHelper


  • public class AuditSerdeHelper
    extends Object
    Audit utility class that can be used by different implementations of AuditManager to serialize/deserialize audit payloads based on the values configured in AuditManagerConfig.
    • Constructor Detail

      • AuditSerdeHelper

        @Inject
        public AuditSerdeHelper​(AuditManagerConfig config,
                                Escalator escalator,
                                com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
                                com.fasterxml.jackson.databind.ObjectMapper jsonMapperSkipNulls)
    • Method Detail

      • shouldProcessAuditEntry

        public boolean shouldProcessAuditEntry​(org.apache.druid.audit.AuditEntry entry)
        Checks if the given audit event needs to be handled.
        Returns:
        true only if the event was not initiated by the Druid system OR if system requests should be audited too.
      • processAuditEntry

        public org.apache.druid.audit.AuditEntry processAuditEntry​(org.apache.druid.audit.AuditEntry entry)
        Processes the given AuditEntry for further use such as logging or persistence. This involves serializing and truncating the payload based on the values configured in AuditManagerConfig.
        Returns:
        A new AuditEntry with a serialized payload that can be used for logging or persistence.