ข้ามไปยังเนื้อหา

Class NewRelicTelemetryExportOptions

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

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

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

public sealed class NewRelicTelemetryExportOptions

objectNewRelicTelemetryExportOptions

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

Gets or sets the base New Relic OTLP endpoint used for direct ingestion.

public string? Endpoint { get; set; }

string?

If this value is omitted and direct ingestion is enabled, the package derives the endpoint from . 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 New Relic ingestion.

public string? Headers { get; set; }

string?

Use the standard OTLP key=value comma-separated format. This value takes precedence over when both are configured.

Gets or sets the New Relic license key used to build the required api-key header when the package should construct OTLP headers from structured settings.

public string? LicenseKey { get; set; }

string?

Gets or sets the New Relic OTLP region used when the package derives the direct-ingestion endpoint.

public string? Region { get; set; }

string?

Supported values are us, eu, and fedramp. If omitted, the package defaults to the New Relic US OTLP endpoint.

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 New Relic native OTLP endpoint when no shared collector endpoint is configured.

public bool UseNativeOtlpEndpoint { get; set; }

bool

This direct path is intended for the documented New Relic native OTLP ingestion route. 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 New Relic telemetry export options from configuration.

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

NewRelicTelemetryExportOptions

The bound New Relic telemetry export options.