Purview.Telemetry.SourceGenerator 1.0.5

dotnet add package Purview.Telemetry.SourceGenerator --version 1.0.5
NuGet\Install-Package Purview.Telemetry.SourceGenerator -Version 1.0.5
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.5" />
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.5
#r "nuget: Purview.Telemetry.SourceGenerator, 1.0.5"
#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.5

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

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.5 77 5/6/2024
1.0.4 56 5/1/2024
1.0.3 132 4/30/2024
1.0.2 81 4/25/2024
1.0.1 75 4/25/2024
1.0.0 80 4/22/2024
0.0.14-prerelease 75 4/8/2024
0.0.13-prerelease 71 4/7/2024
0.0.12-prerelease 69 4/6/2024
0.0.11-prerelease 74 4/6/2024
0.0.10-prerelease 66 4/6/2024