Skip to content

Class GrafanaCloudTelemetryExportOptions

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

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

public sealed class GrafanaCloudTelemetryExportOptions

objectGrafanaCloudTelemetryExportOptions

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 GrafanaCloudTelemetryExportOptions()

Gets or sets the Grafana Cloud access-policy token used as the Basic-auth password when the package should build the Authorization header from structured settings.

public string? AccessPolicyToken { get; set; }

string?

Gets or sets the base Grafana Cloud OTLP endpoint used for direct ingestion.

public string? Endpoint { get; set; }

string?

Set this to the Grafana Cloud OTLP endpoint generated by the stack administration console. For OTLP/HTTP the package treats this as the base endpoint and appends the signal-specific /v1/traces, /v1/metrics, or /v1/logs suffix automatically.

Gets or sets the raw OTLP headers string used for direct Grafana Cloud ingestion.

public string? Headers { get; set; }

string?

Use the standard OTLP key=value comma-separated format. This value usually comes directly from the generated OTEL_EXPORTER_OTLP_HEADERS environment variable.

Gets or sets the Grafana Cloud instance identifier used as the Basic-auth username when the package should build the Authorization header from structured settings.

public string? InstanceId { get; set; }

string?

This value is unrelated to the OpenTelemetry service.instance.id resource attribute. Use it together with when you prefer configuration values over a prebuilt string.

Gets or sets the optional service.namespace resource attribute to stamp onto exported telemetry.

public string? ServiceNamespace { get; set; }

string?

Gets or sets a value indicating whether the package should target the Grafana Cloud OTLP endpoint when no shared collector endpoint is configured.

public bool UseDirectGrafanaCloudEndpoint { get; set; }

bool

This direct path is intended for the connection details Grafana Cloud generates through OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS. Teams that prefer a collector or gateway can keep using the shared Endpoint or UseSelfHostedDefaults contract instead.

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Binds Grafana Cloud telemetry export options from configuration.

public static GrafanaCloudTelemetryExportOptions 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.

GrafanaCloudTelemetryExportOptions

The bound Grafana Cloud telemetry export options.