Purview.Telemetry.SourceGenerator 1.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Purview.Telemetry.SourceGenerator --version 1.0.7                
NuGet\Install-Package Purview.Telemetry.SourceGenerator -Version 1.0.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Purview.Telemetry.SourceGenerator" Version="1.0.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Purview.Telemetry.SourceGenerator --version 1.0.7                
#r "nuget: Purview.Telemetry.SourceGenerator, 1.0.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Purview.Telemetry.SourceGenerator as a Cake Addin
#addin nuget:?package=Purview.Telemetry.SourceGenerator&version=1.0.7

// Install Purview.Telemetry.SourceGenerator as a Cake Tool
#tool nuget:?package=Purview.Telemetry.SourceGenerator&version=1.0.7                

Purview Telemetry Source Generator

Generates ActivitySource, High-performance logging and Metrics based on methods on an interface, enabling fast iteration cycles, dependency injection and substitutes for testing.

The latest version is available on NuGet, and supports generating for the following frameworks:

  • .NET Framework 4.7.2
  • .NET Framework 4.8
  • .NET 7
  • .NET 8
[ActivitySource]
[Logger]
[Meter]
interface IEntityStoreTelemetry
{
    /// <summary>
    /// Creates and starts an Activity and adds the parameters as Tags and Baggage.
    /// </summary>
    [Activity]
    void GettingEntityFromStore(int entityId, [Baggage]string serviceUrl);

    /// <summary>
    /// Adds an ActivityEvent to the Activity with the parameters as Tags.
    /// </summary>
    [Event]
    void GetDuration(int durationInMS);

    /// <summary>
    /// Adds the parameters as Baggage to the Activity.
    /// </summary>
    [Context]
    void RetrievedEntity(float totalValue, int lastUpdatedByUserId);

    /// <summary>
    /// Generates a structured log message using an ILogger.
    /// </summary>
    [Log]
    void ProcessingEntity(int entityId, string updateState);

    /// <summary>
    /// Adds 1 to a Counter<T> with the entityId as a Tag.
    /// </summary>
    [AutoCounter]
    void RetrievingEntity(int entityId);
}

For more information see the wiki.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.12 124 6/9/2024
1.0.11 136 6/3/2024
1.0.10 100 6/3/2024
1.0.9 114 5/30/2024
1.0.8 105 5/27/2024
1.0.7 109 5/20/2024
1.0.6 115 5/20/2024
1.0.5 124 5/6/2024
1.0.4 100 5/1/2024
1.0.3 330 4/30/2024
1.0.2 112 4/25/2024
1.0.1 105 4/25/2024
1.0.0 114 4/22/2024
0.0.14-prerelease 106 4/8/2024
0.0.13-prerelease 106 4/7/2024
0.0.12-prerelease 96 4/6/2024
0.0.11-prerelease 100 4/6/2024
0.0.10-prerelease 95 4/6/2024