Class GcpTelemetryExportOptions
Namespace: Cephalon.Observability.Gcp.Configuration
Assembly: Cephalon.Observability.Gcp.dll
Configures GCP-hosted observability defaults on top of the shared Cephalon telemetry contract.
public sealed class GcpTelemetryExportOptionsInheritance
Section titled “Inheritance”object ← GcpTelemetryExportOptions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”GcpTelemetryExportOptions()
Section titled “ GcpTelemetryExportOptions()”Initializes a new instance of the
public GcpTelemetryExportOptions()Properties
Section titled “Properties”HostedPlatform
Section titled “ HostedPlatform”Gets or sets the hosted GCP platform whose default resource attributes should be applied.
public string? HostedPlatform { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Supported values are gce, gke, cloudrun, appengine, and functions.
The package maps them to the current OpenTelemetry cloud.platform attribute values.
Location
Section titled “ Location”Gets or sets the GCP location to stamp onto exported resources when one should be made explicit.
public string? Location { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When the value looks like a zonal location such as asia-southeast1-b, the package also derives
the matching cloud.region. When omitted, the package falls back to common GCP runtime
environment variables when they are available.
QuotaProjectId
Section titled “ QuotaProjectId”Gets or sets the optional quota project header used for Google-managed ingestion requests.
public string? QuotaProjectId { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This value is written to the x-goog-user-project header only for Google-managed ingestion.
Shared collector or self-hosted OTLP paths ignore it.
UseApplicationDefaultCredentials
Section titled “ UseApplicationDefaultCredentials”Gets or sets a value indicating whether Google-managed ingestion should authenticate by using Application Default Credentials.
public bool UseApplicationDefaultCredentials { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This setting only applies when
UseGoogleManagedIngestion
Section titled “ UseGoogleManagedIngestion”Gets or sets a value indicating whether the package should use Google-managed OTLP ingestion for traces and metrics when no shared collector endpoint is configured.
public bool UseGoogleManagedIngestion { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When this flag is enabled, the package targets https://telemetry.googleapis.com for traces and
metrics by using OTLP/HTTP plus Application Default Credentials. Logs stay on the shared collector or
platform logging path instead of being redirected through the Google-managed ingestion endpoint.
Methods
Section titled “Methods”FromConfiguration(IConfiguration, string)
Section titled “ FromConfiguration(IConfiguration, string)”Binds GCP telemetry export options from configuration.
public static GcpTelemetryExportOptions FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")Parameters
Section titled “Parameters”configuration IConfiguration
The application configuration root.
sectionPath string
The configuration section path that contains the engine settings. The default is Engine.
Returns
Section titled “Returns”The bound GCP telemetry export options.