Context Formula – Extract Contextual Values from Log Events
The Context formula is a powerful tool in Nodinite that lets you extract specific values from the context part of a logged message — such as HTTP headers, tracked properties, or custom metadata.
🧩 Use it in Search Fields to filter or analyze logs more effectively.
🔍 Ideal for finding correlation IDs, custom headers, or context properties from Logic Apps, BizTalk, or any custom integration.
⚡ Boost troubleshooting speed with targeted context extraction.
What Is the Context Formula?
The context
Formula lets you extract a single value from the key-value context section of a Nodinite Log Event. This is particularly useful when you need to expose or search against metadata that isn’t part of the message body — such as:
- HTTP headers (e.g.,
X-Correlation-Id
) - Logic Apps tracked properties
- BizTalk context properties
- Custom log metadata from your applications
Syntax
context('YourContextKey')
YourContextKey
- The exact name of the key in the Log Event context
Practical Examples
Each example below demonstrates:
- Input: What the context contains
- Formula: The expression used in a Nodinite Search Field
- Result: What gets extracted
🧪 Example 1: Correlation ID
- Input Context
Correlation Id = demo001
- Formula
context('Correlation Id')
- Result
demo001
🧪 Example 2: Custom Header Value
- Input Context
CustomHeader = Nodinite-Integration
- Formula
context('CustomHeader')
- Result
Nodinite-Integration
Context Example
Visual representation of context key-value extraction.
Why Use the Context Formula?
✅ Extracts metadata without touching the message body ✅ Works across multiple technologies and integration platforms ✅ Enables smarter filtering and diagnostics in your log views ✅ Helps enforce data governance by surfacing key context data
[!IMPORTANT] The Context formula loads the full message into memory. For best performance, avoid using it on very large messages or in environments with high throughput unless absolutely needed.
Next Step
Related Topics
- Body - Extract message body from the Log Event
- Expression Type Plugins are used in Search Fields
- What are Search Fields?
- What are Search Field Expressions?
- What are Message Types?
- What are Log Views?