nat.observability.register#
Attributes#
Classes#
A telemetry exporter that writes runtime traces to local files with optional rolling. |
|
A logger to write runtime logs to the console. |
|
A logger to write runtime logs to a file. |
Functions#
|
Build and return a FileExporter for file-based telemetry export with optional rolling. |
|
Build and return a StreamHandler for console-based logging. |
|
Build and return a FileHandler for file-based logging. |
Module Contents#
- logger#
- class FileTelemetryExporterConfig(/, **data: Any)#
Bases:
nat.data_models.telemetry_exporter.TelemetryExporterBaseConfig
A telemetry exporter that writes runtime traces to local files with optional rolling.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- mode: nat.observability.mixin.file_mode.FileMode = None#
- async file_telemetry_exporter(
- config: FileTelemetryExporterConfig,
- builder: nat.builder.builder.Builder,
Build and return a FileExporter for file-based telemetry export with optional rolling.
- class ConsoleLoggingMethodConfig(/, **data: Any)#
Bases:
nat.data_models.logging.LoggingBaseConfig
A logger to write runtime logs to the console.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- async console_logging_method(
- config: ConsoleLoggingMethodConfig,
- builder: nat.builder.builder.Builder,
Build and return a StreamHandler for console-based logging.
- class FileLoggingMethod(/, **data: Any)#
Bases:
nat.data_models.logging.LoggingBaseConfig
A logger to write runtime logs to a file.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- async file_logging_method(
- config: FileLoggingMethod,
- builder: nat.builder.builder.Builder,
Build and return a FileHandler for file-based logging.