DotEukali.MetricsClient.Core
8.0.0
dotnet add package DotEukali.MetricsClient.Core --version 8.0.0
NuGet\Install-Package DotEukali.MetricsClient.Core -Version 8.0.0
<PackageReference Include="DotEukali.MetricsClient.Core" Version="8.0.0" />
paket add DotEukali.MetricsClient.Core --version 8.0.0
#r "nuget: DotEukali.MetricsClient.Core, 8.0.0"
// Install DotEukali.MetricsClient.Core as a Cake Addin #addin nuget:?package=DotEukali.MetricsClient.Core&version=8.0.0 // Install DotEukali.MetricsClient.Core as a Cake Tool #tool nuget:?package=DotEukali.MetricsClient.Core&version=8.0.0
DotEukali.MetricsClient.Core
Simple Http wrapper for New Relic Metrics API.
To use, simply add configuration eg:
{
"MetricsOptions": {
"ApiKey": "{{your New Relic metrics api key}}",
"ApiUrl": "{{this is optional, the current url is hard-coded}}",
"Async": true|false, //(if excluded, this defaults to true, which is the existing default behaviour)
"Attributes": {
"host.name": "my.host",
"app.name": "myapp",
"myotherAttribute": 10
}
}
}
Change in 7.0.0, have targeted net6 and net7 specifically, instead of netstandard2.1.
Added with 6.1.0 is synchronous metrics sending - not usually desired, but I have added it for use where the background process might get prematurely terminated. This is configured in appsettings and applies to everything, maybe I'll update it later so the send method can be chosen as needed in the code...
If the attribute app.name
exists, it will be prefixed to the metric name, eg myapp_mymetricname
.
ApiUrl
is optional, in case the default url needs to be overriden.
Attributes are parsed as IDictionary<string, object>
and sent with every metric.
Polly has been removed as a dependency as of 0.2.3 and a new registration extension created to replace the old which returns IHttpClientBuilder, allowing Polly or other handling logic to be added explicitly.
Microsoft dependency injection is used and can be wired up like:
serviceCollection.AddMetricsClient(Configuration);
Then, simply inject IMetrics
where needed and use.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 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 is compatible. 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. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 6.0.1)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.4)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0.0)
-
net7.0
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 7.0.0)
-
net8.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.