Namespace Neon.Service
Classes
LogMetricsProcessor
This OpenTelemetry processor maintains the labeled neonsdk_log_events_total metrics counter by incrementing the counter whenever events are logged, using the event's LogLevel as the counter label.
note
NeonService based applications configure this processor by default.
MetricsOptions
Specifies options for a NeonService. This is initialized to reasonable defaults.
NeonService
Handy base class for application services. This class handles process termination signals when running on Linux, OS/X, and similar environments and also provides some features to help you run unit tests on your service.
NeonServiceOptions
Optionally passed to the NeonService constructor to specify additional service related options.
OtelConfigExtensions
Implements extension methods used for configuring Neon.Diagnostics related exporters and processors.
OtlpCollectorChecker
Used to check for the presence of a DNS host specified by a URI. This is used by services to determine whether an OTEL Collector relay service exists in the Kubernetes namespace where the service is running.
The idea is for the service call Start(NeonService, Uri, TimeSpan) to start the checker and then set the trace sampler to Sampler so that tracing will be enabled when the collector relay service exists and disable tracing when it doesn't.
ProcessTerminator
Gracefully handles SIGTERM signals sent to a process to terminate itself.
ServiceApiContact
Holds the contact information for a service API. This maps closely to the Microsoft.OpenApi.Models.OpenApiContact class.
ServiceApiInfo
Human readable metadata for a service API. This maps pretty closely
to the Microsoft.OpenApi.Models.OpenApiInfo
class which is used
to by Swagger when generating ASP.NET documentation.
note
We're not referencing the Microsoft.OpenApi nuget package to avoid adding about 166KB to applications using the Neon.Common assembly.f
ServiceApiLicense
Holds the license information for a service API. This maps closely to the Microsoft.OpenApi.Models.OpenApiLicense class.
ServiceDependencies
Used to specify other services that must be reachable via the network before a NeonService will be allowed to start. This is exposed via the Dependencies where these values can be configured in code before RunAsync(bool) is called or they can also be configured via environment variables as described in the remarks.
ServiceDescription
Describes a remote service.
ServiceEndpoint
Describes a network endpoint for remote service.
ServiceEndpoints
Holds the endpoint definitions for a service.
ServiceMap
Describes a collection of services deployed to Kubernetes or that run in a simulated unit test environment. This is simply a dictionary mapping case sensitive service names to ServiceDescription records for each service.
note
ServiceMap is a somewhat dated concept that doesn't make a lot of sense in the Kubernetes world. We recommend that new code avoid this.
Enums
MetricsMode
Used control how or whether a NeonService publishes Prometheus metrics.
NeonServiceStatus
Enumerates the possible NeonService running states.
ServiceEndpointProtocol
Enumerats the network protocols that can be implemented by a ServiceEndpoint.