Skip to content

Class KubernetesTelemetryExportOptions

Namespace: Cephalon.Observability.Kubernetes.Configuration
Assembly: Cephalon.Observability.Kubernetes.dll

Configures Kubernetes observability defaults on top of the shared Cephalon telemetry contract.

public sealed class KubernetesTelemetryExportOptions

objectKubernetesTelemetryExportOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Initializes a new instance of the class.

public KubernetesTelemetryExportOptions()

Gets or sets the Kubernetes cluster name to stamp onto exported resources.

public string? ClusterName { get; set; }

string?

Gets or sets the collector namespace used to build the in-cluster Kubernetes collector endpoint.

public string? CollectorNamespace { get; set; }

string?

When omitted, the package falls back to and then to POD_NAMESPACE when the host runs inside a pod.

Gets or sets the collector port used for the in-cluster Kubernetes collector endpoint.

public int? CollectorPort { get; set; }

int?

When omitted, the package falls back to 4317 for otlp / otlp/grpc and 4318 for otlp/http.

Gets or sets the URI scheme used for the in-cluster Kubernetes collector endpoint.

public string? CollectorScheme { get; set; }

string?

Supported values are http and https. The default is http.

Gets or sets the collector service name used to build the in-cluster Kubernetes collector endpoint.

public string? CollectorServiceName { get; set; }

string?

Gets or sets the container name to stamp onto exported resources.

public string? ContainerName { get; set; }

string?

When omitted, the package falls back to the CONTAINER_NAME environment variable when it is available.

Gets or sets the raw OTLP headers string added to Kubernetes collector requests.

public string? Headers { get; set; }

string?

Use the standard OTLP key=value comma-separated format when a collector, gateway, or route expects explicit headers.

Gets or sets the workload namespace to stamp onto exported resources.

public string? Namespace { get; set; }

string?

When omitted, the package falls back to the current pod namespace through the POD_NAMESPACE environment variable when it is available.

Gets or sets the Kubernetes node name to stamp onto exported resources.

public string? NodeName { get; set; }

string?

When omitted, the package falls back to the NODE_NAME environment variable when it is available.

Gets or sets the pod name to stamp onto exported resources.

public string? PodName { get; set; }

string?

When omitted, the package falls back to POD_NAME and then HOSTNAME when those environment variables are available.

Gets or sets the pod UID to stamp onto exported resources.

public string? PodUid { get; set; }

string?

When omitted, the package falls back to the POD_UID environment variable when it is available.

Gets or sets the service DNS suffix used to build the in-cluster Kubernetes collector endpoint.

public string? ServiceDnsSuffix { get; set; }

string?

The default is svc.cluster.local. Set this when a cluster uses a non-default service DNS suffix.

Gets or sets the filesystem path to a trusted CA bundle used for HTTPS OTLP/HTTP traces and metrics against in-cluster or shared Kubernetes collectors.

public string? TrustedCaCertificatePath { get; set; }

string?

Because the current OTLP logging exporter does not support custom HttpClient wiring for HTTP, the package rejects configurations that require this custom CA path for logs. OTLP/gRPC custom CA wiring is also left explicit and unsupported for now.

Gets or sets a value indicating whether the package should target an in-cluster collector service when no shared endpoint is configured.

public bool UseInClusterCollectorService { get; set; }

bool

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Binds Kubernetes telemetry export options from configuration.

public static KubernetesTelemetryExportOptions FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")

configuration IConfiguration

The application configuration root.

sectionPath string

The configuration section path that contains the engine settings. The default is Engine.

KubernetesTelemetryExportOptions

The bound Kubernetes telemetry export options.