Skip to content

alex-kabin/AK.App.Metrics.Reporting.InfluxDB2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App.Metrics.Reporting.InfluxDB2

Usage sample:

binding config in C#:

if (configuration.GetSection(nameof(InfluxDbOptions)).Exists()) {
    builder.Report.ToInfluxDb(
        options => {
            configuration.GetSection(nameof(InfluxDbOptions)).Bind(options.InfluxDb);
            options.FlushInterval = TimeSpan.FromSeconds(5);
        }
    );
}

configuration section:

"InfluxDbOptions": {
  "BaseUri": "http://localhost:8086/api/v2/",
  "Bucket": "my_metrics",
  "Token": "IORPUJjn_FeqkAwIiPuxzcRlnEF5COXo2rFtkgxEareZuvzBnLngpwVV6jNNAcq5285r1PUNqO7xh4s1hqlcAA==",
  "OrganizationId": "57c2f3218e7fc734",
  "CreateBucketIfNotExists": true,
  "BucketRetentionDuration": "06:00:00",
  "EnableGzip": true
}

About

AppMetrics reporter to InfluxDB2

Topics

Resources

Stars

Watchers

Forks

Languages