Tobias Zimmergren 12/1/2016

Getting the instance id of a running Azure Function with ExecutionContext.InvocationId

Read Original

This article explains how to obtain the invocation ID of a running Azure Function instance using the ExecutionContext.InvocationId property. It covers adding ExecutionContext as a parameter to your function, accessing the unique GUID assigned to each function invocation, and using it in custom log messages to distinguish between multiple concurrent instances. The tutorial includes a practical C# code example demonstrating how to append the invocation ID to log outputs, making it easier to filter and identify logs from different invocations in streaming log services or log consoles. This is useful for debugging batch processing scenarios where multiple function instances run simultaneously.

Getting the instance id of a running Azure Function with ExecutionContext.InvocationId

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet