Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


GitHub release NuGet Package License Build Status

The Thor tracing core for .net

The tracing core contains everything to enable ETW tracing in your .net application.

Getting Started

Install Package

Here is how the Thor.Core has to be installed via NuGet on a powershell console.

Install-Package Thor.Core

Code Example

Okay, after installing our dependencies we could start writing a bit code.

How to scope (group) events together

The following code is not production ready. This code should give only an idea of how to group ETW events into an activity.

using System;
using System.Threading;
using Thor.Core;
using static Thor.Core.DefaultEventSource;

public class UserRepository

    public async Task<bool> RemoveAsync(User user)
        using (Activity.Create("Remove User"))
                Log.Info($"Removing user with id {user.Id}");

                if (await _collection.RemoveAsync(user.Id).ConfigureAwait(false))
                    Log.Info($"Removed user with id {user.Id} successfully");

                    return true;
                    Log.Info($"User with id {user.Id} not found");

                    return false;
            catch (Exception ex)
                Log.Info(ex, $"Removing user with id {user.Id} failed");

                return false;



Click here to get to the documentation home of Thor Core.

Checkout the Thor Generator

We strongly recommend to use the Thor Generator to generate your own event sources automatically and avoid using the DefaultEventSource, because Semantic Tracing is much more powerful for you in the end. Click here to get more information about the Thor Generator.