Skip to content
Documentation
Updated 4 minutes to read
Markdown

ContextPropertiesFilters - System Parameter

Section titled “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.

An invoice Log Event with five Context Values, two of them named Contoso.Debug#, ContextPropertiesFilters opened from the System Parameters list and given one filter that removes names starting with Contoso.Debug#, saved, then a new invoice event stored with only three Context Values while the earlier event still has all five, animated walkthrough (7.12)
Animated walkthrough: one filter removes the Contoso.Debug# context properties. A new invoice event is stored without them, while the event logged before the change keeps all five. The Log API and the Logging Service were restarted off camera so the change applied at once.

  1. Open a Log Event's Context Values tab: five values, two of them named Contoso.Debug#....
  2. Filter the System Parameters list on ContextProperties and open ContextPropertiesFilters.
  3. Add one filter, ^Contoso\\.Debug#, that removes names starting with Contoso.Debug#. Save.
  4. Log a new invoice event: it's stored without the Contoso.Debug# values.
  5. Open the earlier event: it still has all five. Only new events are filtered.
Property Value
Key ContextPropertiesFilters
Data type json
Default null (no filtering)
Read by Log API and Logging Service
Takes effect Within about 15–20 minutes (the Log API keeps the filters 20 minutes, the Logging Service 15); restart both to apply a change at once
Status ✅ Active
Since Nodinite 6.0.0.11

The Log API applies the filters to every event it receives, so matching data never enters Nodinite. The Logging Service applies them while it processes events from other sources, and when Log Events are re-indexed. In both places, each context property's name is compared with the enabled filters, and a property whose name matches is removed before it is stored. Events stored before a change keep their context properties.

Nothing is filtered when the value is null or when the global Enabled is false.

To hide a value but keep the context property, use ProtectedContextValues instead.

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 1 second per context property. An expression that doesn't compile is skipped and logged; the others still apply.
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.

  • 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 1-second limit.
  • Use Filters[].Enabled to switch an entry off instead of deleting it.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...