ContextPropertiesFilters - System Parameter
The ContextPropertiesFilters System Parameter removes context properties from Log Events when their names match a regular expression (RegEx). Use it to keep sensitive data, such as passwords and keys, out of the Log Databases, and to save disk space. Context properties and the reserved Context Options keys are described with the Log Event.
At a Glance
| Property | Value |
|---|---|
| Key | ContextPropertiesFilters |
| Data type | json |
| Default | null (no filtering) |
| Read by | Logging Service |
| Takes effect | Within about 15–20 minutes; no restart needed |
| Status | ✅ Active |
| Since | Nodinite 6.0.0.11 |
How It Works
When the Logging Service processes a Log Event, it compares the name of each context property with the enabled filters. A property whose name matches is removed before it is stored. The same filtering runs when Log Events are re-indexed. The Nodinite Log API can also apply the filters when it receives events, so the data never enters the system.
Nothing is filtered when the value is null or when the global Enabled is false.
Important
Filtering permanently removes data; a removed context property can't be restored by a re-index. Test your expressions before you enable them in production.
Warning
Never remove
http://schemas.microsoft.com/BizTalk/2003/system-properties#MessageExchangePattern. The Logging Service uses it to set the correct Event Direction for Log Events from BizTalk Server.
To hide a value but keep the context property, use ProtectedContextValues instead.
Value Format
The value is a JSON object with these properties:
| Property | Type | Meaning |
|---|---|---|
Enabled |
boolean | Global switch. false turns all filtering off. |
Filters |
array | The filter entries. |
Filters[].RegExFilter |
string | Regular expression matched against the context property name. Case-insensitive; each expression may run for at most 25 milliseconds. |
Filters[].Description |
string | Optional. Describes the intent of the entry. |
Filters[].Enabled |
boolean | Turns a single entry on or off, so you can keep an expression while you experiment. |
{
"Enabled": true,
"Filters": [
{
"RegExFilter": "password",
"Description": "Removes all context properties with password in the name (case-insensitive)",
"Enabled": true
},
{
"RegExFilter": "http://schemas.microsoft.com/BizTalk/2003/file-properties#SecretKey",
"Description": "Removes the secret key used on dynamic send ports",
"Enabled": true
}
]
}
Example: remove every context property with "password" in its name, and the BizTalk Server secret key property.
Choosing a Value
- Fewer, broader expressions perform better than many narrow ones; one RegEx can cover several property names.
- Keep expressions simple so they finish well within the 25 ms limit.
- Use
Filters[].Enabledto switch an entry off instead of deleting it.
Next Steps
Related Topics
- ProtectedContextValues - Mask context values instead of removing them
- Event Directions
- Log Databases
- System Parameters