Skip to content

DataConstraints

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

interface DataConstraints

This interface allows sanitizing logs locally before uploading them to the servers.

Inheritors

DatadogDataConstraints

Functions

validateAttributes

abstract fun <T> validateAttributes(attributes: Map<String, T>, keyPrefix: String? = null, attributesGroupName: String? = null, reservedKeys: Set<String> = emptySet()): MutableMap<String, T>

Validates attributes according to the particular rules.

Parameters
T type of attribute values.
attributes Attributes to validate.
keyPrefix Optional key prefix for the attributes root (ex. "usr").
attributesGroupName Optional description for the attributes to validate.
reservedKeys Collection of reserved key. If attribute name is in the reserved key, this attribute will be rejected.

validateTags

abstract fun validateTags(tags: List<String>): List<String>

Validates tags according to the particular rules.

Parameters
tags Tags to validate.

validateTimings

abstract fun validateTimings(timings: Map<String, Long>): MutableMap<String, Long>

Validate timings according to the particular rules.

Parameters
timings Timings to validate.
Clone this wiki locally