MondoCore.Azure.ApplicationInsights 1.9.0

dotnet add package MondoCore.Azure.ApplicationInsights --version 1.9.0
                    
NuGet\Install-Package MondoCore.Azure.ApplicationInsights -Version 1.9.0
                    
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="MondoCore.Azure.ApplicationInsights" Version="1.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MondoCore.Azure.ApplicationInsights" Version="1.9.0" />
                    
Directory.Packages.props
<PackageReference Include="MondoCore.Azure.ApplicationInsights" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MondoCore.Azure.ApplicationInsights --version 1.9.0
                    
#r "nuget: MondoCore.Azure.ApplicationInsights, 1.9.0"
                    
#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.
#addin nuget:?package=MondoCore.Azure.ApplicationInsights&version=1.9.0
                    
Install MondoCore.Azure.ApplicationInsights as a Cake Addin
#tool nuget:?package=MondoCore.Azure.ApplicationInsights&version=1.9.0
                    
Install MondoCore.Azure.ApplicationInsights as a Cake Tool

MondoCore.ApplicationInsights

Class for logging telemetry to Azure Application Insights

<br>

Dependency Injection

Best practice for using the ApplicationInsights class is to use it as a provider for the Log class (in MondoCore.Log)

public class Startup : FunctionsStartup
{
    public override void Configure(IFunctionsHostBuilder builder)
    {
        // Register the main Log class as a singleton.
        builder.Services.AddSingleton<ILog>( (p)=> 
        {
            var log = new Log();

            // Use GetService to get the TelemetryConfiguration to share with the host
            log.Register( new ApplicationInsights( p.GetService<TelemetryConfiguration>() ) );

            return log;
        );

        // Register IRequestLog as scoped. That same instance will be returned within the scope of a function invocation
        builder.Services.AddScoped<IRequestLog, RequestLog>();
    }
}

<br>

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.9.0 125 12/4/2024
1.8.0 126 10/9/2024
1.7.0 123 10/1/2024
1.5.0 2,965 10/6/2023
1.4.3 1,230 7/29/2021

Add WriteAvailability