Can you please explain on how we can set ActivityId in Semantic Logging by using .Net 4.5.1?
Can you please explain on how we can set ActivityId in Semantic Logging by using .Net 4.5.1
555 views Asked by Rajesh Kumar At
1
Can you please explain on how we can set ActivityId in Semantic Logging by using .Net 4.5.1?
You can use the
EventSource.SetCurrentThreadActivityId
to set the current thread activity ID. If you need to link two activity IDs then use the WriteEventWithRelatedActivityId method instead of the usual WriteEvent.See Activity tracing and sampling for more information.