forked from microsoft/ApplicationInsights-Kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppInsightsForKubernetesOptions.cs
More file actions
57 lines (50 loc) · 2.46 KB
/
Copy pathAppInsightsForKubernetesOptions.cs
File metadata and controls
57 lines (50 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using Microsoft.ApplicationInsights.Kubernetes;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Object model of configuration for Application Insights for Kubernetes.
/// </summary>
public class AppInsightsForKubernetesOptions
{
/// <summary>
/// Configuration section name.
/// </summary>
public const string SectionName = "AppInsightsForKubernetes";
/// <summary>
/// Maximum time to wait for spinning up the container.
/// </summary>
public TimeSpan InitializationTimeout { get; set; } = TimeSpan.FromMinutes(2);
/// <summary>
/// Gets or sets the processor for telemetry key. This is introduced to allow customization of
/// telemetry keys.
/// </summary>
public Func<string, string>? TelemetryKeyProcessor { get; set; }
/// <summary>
/// Gets or sets the time-span for exponent interval base. This will be used as the interval between querying the Kubernetes cluster for properties.
/// For example, in y = power(2, x), 2 is the base, and the interval will then be 2 seconds, 4 seconds, 8 seconds, 16 seconds ... until it reached the
/// <see cref="ClusterInfoRefreshInterval" />.
/// The base is default to 2 seconds.
/// </summary>
public TimeSpan ExponentIntervalBase { get; set; } = TimeSpan.FromSeconds(2);
/// <summary>
/// Get or sets how frequent to refresh the cluster info.
/// For example: 00:10:00 for 10 minutes.
/// The default value is 10 minutes.
/// </summary>
public TimeSpan ClusterInfoRefreshInterval { get; set; } = TimeSpan.FromMinutes(10);
/// <summary>
/// Gets or sets an environment check action to determine if the the current process is inside a Kubernetes cluster.
/// When set to null (also the default), a built-in checker will be used.
/// </summary>
public IClusterEnvironmentCheck? ClusterCheckAction { get; set; } = null;
/// <summary>
/// For backward compatibility reason to allow the user to opt-in to
/// keep overwriting the SDK version in telemetry. It doesn't make too
/// much sense to use it and has caused quite a confusion on the support
/// side.
/// Default to false and look into totally get rid of it in the future.
/// </summary>
public bool OverwriteSDKVersion { get; set; }
}
}