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
}