using Prometheus;
using System;
namespace DockerExporter
{
static class Constants
{
// Will be replaced with real version string (AssemblyInfo number + build parameters) on automated build.
public const string VersionString = "__VERSIONSTRING__";
///
/// Docker can sometimes be slow to respond. If that is the case, we just give up and try
/// again later. This limit is applied per individual API call, so does not reflect the
/// total possible duration of a scrape, which is handled by the timeout values below.
///
public static readonly TimeSpan DockerCommandTimeout = TimeSpan.FromSeconds(30);
///
/// We are willing to delay a single scrape up to this long to wait for fresh data.
/// Beyond this point, the update can still continue but will be done in the background.
///
public static readonly TimeSpan MaxInlineUpdateDuration = TimeSpan.FromSeconds(20);
///
/// Even if the update happens in the background, it will be cancelled if it takes
/// more time than this. The next scrape will try again from scratch.
///
public static readonly TimeSpan MaxTotalUpdateDuration = TimeSpan.FromMinutes(2);
///
/// The default buckets used to measure Docker probe operation durations.
///
public static readonly double[] DurationBuckets = Histogram.ExponentialBuckets(0.5, 1.5, 14);
}
}