JF91.AppMetricsInfluxDB2 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package JF91.AppMetricsInfluxDB2 --version 1.0.1                
NuGet\Install-Package JF91.AppMetricsInfluxDB2 -Version 1.0.1                
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="JF91.AppMetricsInfluxDB2" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JF91.AppMetricsInfluxDB2 --version 1.0.1                
#r "nuget: JF91.AppMetricsInfluxDB2, 1.0.1"                
#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 JF91.AppMetricsInfluxDB2 as a Cake Addin
#addin nuget:?package=JF91.AppMetricsInfluxDB2&version=1.0.1

// Install JF91.AppMetricsInfluxDB2 as a Cake Tool
#tool nuget:?package=JF91.AppMetricsInfluxDB2&version=1.0.1                
1 - Add this section to your appsettings.json and modify it to your needs:
"MetricsOptions": {
    "DefaultContextLabel": "MyCustomContext",
    "Enabled": true
},
    "MetricsWebTrackingOptions": {
    "ApdexTrackingEnabled": true,
    "ApdexTSeconds": 0.1,
    "IgnoredHttpStatusCodes": [ 404 ],
    "IgnoredRoutesRegexPatterns": [],
    "OAuth2TrackingEnabled": true
},
    "MetricEndpointsOptions": {
    "MetricsEndpointEnabled": true,
    "MetricsTextEndpointEnabled": true,
    "PingEndpointEnabled": true,
    "EnvironmentInfoEndpointEnabled": true
},
    "MetricsReportingInfluxDb2Options": {
    "InfluxDb2": {
    "BaseUri": "http://127.0.0.1:8086",
    "Organization": "metrics",
    "Bucket": "metrics",
    "Token": "changeme"
},
    "HttpPolicy": {
    "BackoffPeriod": "0:0:30",
    "FailuresBeforeBackoff": 5,
    "Timeout": "0:0:40"
},
    "ReportInterval": "0:0:1"
}

<br>

2: Add this before builder.Build();
builder.Services.AddMetricsServices();
builder.WebHost.AddInfluxDb2AppMetrics(builder.Configuration);

<br>

3: Add this after builder.Build();
app.UseRequestsCounterMiddleware();
app.UseRequestsDurationMiddleware();
app.UseResponsesSizeMiddleware();
app.UseResponsesApdexMiddleware();
app.UseMetricsAllMiddleware();
app.UseMetricsAllEndpoints();

<br>

4 Add this before app.Run();
app.UseHttpStatusCodesCounterMiddleware();
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
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.2.0 199 7/10/2023
1.0.1 166 7/9/2023
1.0.0 163 7/9/2023