SizeThresholds Section
The "SizeThresholds" section in the configuration enables you to set limits for when large binary (blob) and string (slob) objects should be stored externally instead of being included directly in the JSON output.
"SizeThresholds": { "SlobThresholdBytes": "30KB", "BlobThresholdBytes": "100KB" }
The "SizeThresholds" values are listed in the following table.
Value | The maximum size for... |
---|---|
SlobThresholdBytes | String (slob) objects before they are stored externally |
BlobThresholdBytes | Binary (blob) objects before they are stored externally |
Value Format
Values can be specified as a:
-
Plain number, representing bytes
-
String with a KB or MB suffix for kilobytes or megabytes, respectively
Examples of the value format are as follows.
-
"30KB" (30 kilobytes)
-
"1MB" (1 megabyte)
-
50000 (50,000 bytes)
Behavior
If a slob property exceeds the SlobThresholdBytes value, it will be stored externally, and a URI referencing the stored data will be included in the JSON event instead.
If a blob property exceeds the BlobThresholdBytes value, it will be stored externally, and a URI referencing the stored data will be included in the JSON event instead.
Properties below these thresholds are included directly in the JSON event (strings as escaped text and binary data as base64‑encoded strings).
Valid units for BlobThresholdBytes and SlobThresholdBytes are B (bytes), KB (kilobytes), and MB (megabytes). These values are case‑insensitive. Setting both thresholds to zero (0) causes all blob and slob properties to be stored externally, regardless of size.
Default Values
If not specified in the configuration:
-
SlobThresholdBytes defaults to 32,768 bytes (32 KB)
-
BlobThresholdBytes defaults to 65,536 bytes (64 KB)
Notes
When a property is stored externally, a new property with the $<propertyName>_Uri is added to the JSON event and contains the URI of the stored data.
Proper configuration of these thresholds can help balance between JSON payload size and the number of external storage operations, optimizing for your specific use case and network conditions.