Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Comments

Add support for .Net asynchronous/distributed thread tracking via ActivityId.#9

Open
optimiz3 wants to merge 2 commits intojkowalski:masterfrom
optimiz3:master
Open

Add support for .Net asynchronous/distributed thread tracking via ActivityId.#9
optimiz3 wants to merge 2 commits intojkowalski:masterfrom
optimiz3:master

Conversation

@optimiz3
Copy link

@optimiz3 optimiz3 commented Aug 9, 2011

.Net supports logical thread ids for asynchronous operations that may execute over multiple thread pool threads. This is provided via the System.Diagnostics.Trace.CorrelationManager.ActivityId property. .Net always ensures the ActivityId gets propagated across Begin/End async calls as well as QueueUserWorkItem operations. It is often a best practice to also include the ActivityId over network RPC operations so the logical thread/operation can be tracked in a distributed system.

This commit adds the ActivityIdLayoutRenderer to simply write this value out if the user desires. It is derived from the original GuidLayoutRenderer. Much appreciated!

@jkff
Copy link

jkff commented Aug 9, 2011

Wow, thanks - I never heard of this ActivityId property. It will probably turn out very useful for me some day :)

@optimiz3
Copy link
Author

optimiz3 commented Aug 9, 2011

Happy to help! It's incredibly useful when analyzing and merging massive amounts of logs from a cluster.

@jkff
Copy link

jkff commented Aug 9, 2011

Yep, I'm actually using a thingie of my own for that; in case you're interested: https://github.com/jkff/greg , http://code.google.com/p/greg/ (with an NLog appender of course - however the .NET version belongs to my employer; only Java and Haskell I opensourced)

@dan-turner
Copy link

Why hasn't this been merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants