Skip to content

Class NewRelicHostApplicationBuilderExtensions

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

Adds New Relic native OTLP endpoint wiring and api-key authentication guidance for Cephalon hosts.

public static class NewRelicHostApplicationBuilderExtensions

objectNewRelicHostApplicationBuilderExtensions

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

AddCephalonNewRelic<TBuilder>(TBuilder, Action<NewRelicTelemetryExportOptions>?)

Section titled “ AddCephalonNewRelic<TBuilder>(TBuilder, Action<NewRelicTelemetryExportOptions>?)”

Adds New Relic-aware OpenTelemetry registration for the Cephalon engine diagnostics surface.

public static TBuilder AddCephalonNewRelic<TBuilder>(this TBuilder builder, Action<NewRelicTelemetryExportOptions>? configure = null) where TBuilder : IHostApplicationBuilder

builder TBuilder

The target host-application builder.

configure Action<NewRelicTelemetryExportOptions>?

An optional callback that can extend or override the configuration-driven New Relic telemetry export options.

TBuilder

The same builder instance for fluent host composition.

TBuilder

The host-application builder type to extend.

This package keeps New Relic-specific OTLP endpoint and api-key authentication concerns outside Cephalon.Engine and the baseline observability package. It still uses the shared Engine:Observability:Telemetry contract so hosts can keep one explicit telemetry surface.

When Endpoint or UseSelfHostedDefaults is configured on the shared telemetry contract, the package keeps using that collector-oriented OTLP path and only layers New Relic-friendly resource attributes on top. When those shared endpoint settings are absent and the New Relic options opt into direct endpoint usage, the package targets either the configured New Relic OTLP endpoint or the documented regional default and applies either the raw OTLP headers string or the required api-key header built from the configured license key.