Namespace Neon.Diagnostics
Classes
AssertException
Thrown by Assert(bool, string) to signal logic failures.
ConfigExtensions
Implements extension methods used for configuring Neon.Diagnostics related exporters and processors.
ConsoleJsonLogExporter
Exports log records to the console where each record will be written as a line of JSON text to standard output and/or standard error when configured.
This is suitable for production environments like Kubernetes, Docker, etc. where logs are captured from the program output.
ConsoleJsonLogExporterOptions
Specifies the options used to configure a ConsoleJsonLogExporter.
ConsoleTextLogExporter
Exports log records to the console where each record will be written as a line of text to standard output and/or standard error when configured.
ConsoleTextLogExporterOptions
Specifies the options used to configure a ConsoleJsonLogExporter.
FileLogExporter
Exports log records to a file as specified by FileLogExporterOptions.
FileLogExporterOptions
Specifies the options used to configure a ConsoleJsonLogExporter.
LogAsTraceProcessor
This OpenTelemetry processor submits any logged events that satisfy a log level as trace events to the current trace span (if any). This is an easy way to converge logging any tracing while we're waiting for the OpenTelemetry folks support this natively.
LogAsTraceProcessorOptions
Specifies the options used to configure a LogAsTraceProcessor.
LogAttributeNames
Defines attributes names used when emitting log records.
LogAttributes
Holds attributes to be included in log events recorded by ILogger LoggerExtensions.
LogEvent
Used for serializing the log records.
LoggerExtensions
Extends ILogger with additional handy logging methods. We recommend that users standardize on calling these logger extensions as opposed to using Microsoft's standard Microsoft.Extensions.Logging.LoggerExtensions.
NullLogger
Implements a do-nothing ILogger.
TelemetryHub
Provides a standard global place where libraries and applications can gain access to the application's ActivitySource and LoggerFactory for recording traces and logs. Applications that enable tracing and logging and want to enable logging and tracing by Neon libraries set LoggerFactory and ActivitySource immediately after configuring telemetry using the OpenTelemetry and Microsoft.Extensions.Logging APIs.
note
The Neon.Service.NeonService class initializes these properties by default when used by applications based on this class.
CreateLogger<T>(LogAttributes, bool, bool), CreateLogger(Type, LogAttributes, bool, bool), or CreateLogger(string, LogAttributes, bool, bool) are helper methods for obtaining loggers.
You can also set the LogAttributes property to attributes you'd like to include
in the loggers returned by the CreateLogger()
methods. This is a handy way to include
a common set of attributes with all logged events.
The ParseLogLevel(string, LogLevel) utility can be used to parse a log level string obtained from an environment variable or elsewhere. This returns the parsed log level and also sets the Logging__LogLevel__Microsoft environment variable which will be honored by any created loggers.
TelemetrySpanEventNames
NeonSDK related trace/span event names.
TelemetrySpanExtensions
Extends the TelemetrySpan class.
Structs
ExceptionInfo
Used for serializing exception information.
Enums
FileLogExporterFormat
Enumerates FileLogExporter output formats.
Delegates
LogEventInterceptor
Use this delegate for filtering, inspecting, or modifying log events immediately before they are emitted by ConsoleJsonLogExporter or one of the other log exporters in the Neon.Diagnostics namespace.