Package org.apache.druid.server.audit
Class AuditSerdeHelper
java.lang.Object
org.apache.druid.server.audit.AuditSerdeHelper
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 Summary
ConstructorsConstructorDescriptionAuditSerdeHelper(AuditManagerConfig config, Escalator escalator, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper jsonMapperSkipNulls) -
Method Summary
Modifier and TypeMethodDescriptionprocessAuditEntry(AuditEntry entry) Processes the given AuditEntry for further use such as logging or persistence.booleanChecks if the given audit event needs to be handled.
-
Constructor Details
-
AuditSerdeHelper
@Inject public AuditSerdeHelper(AuditManagerConfig config, Escalator escalator, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper jsonMapperSkipNulls)
-
-
Method Details
-
shouldProcessAuditEntry
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
Processes the given AuditEntry for further use such as logging or persistence. This involves serializing and truncating the payload based on the values configured inAuditManagerConfig.- Returns:
- A new AuditEntry with a serialized payload that can be used for logging or persistence.
-