Documentation
¶
Overview ¶
Package warn is where Powertools tells the developer about a likely mistake: what Powertools Python reports through its warnings module, such as an invalid environment variable, a utility disabled for development, a metric set flushed empty, a Datadog tag that may lose data.
Each warning is a JSON record at WARN on standard error, where Lambda collects it, with the keys Lambda's log-level filtering reads (level, timestamp, message) and the Python warning class as its category, so that a log query matches both runtimes. Unlike internal/debug, warnings are always on; each one is written once per process, as Python's default warnings filter shows a warning the first time its text appears.
Index ¶
Constants ¶
const ( UserWarning = "UserWarning" PowertoolsUserWarning = "PowertoolsUserWarning" DatadogDataValidationWarning = "DatadogDataValidationWarning" )
Categories name the Python warning classes.
const NoMetrics = "No application metrics to publish. The cold-start metric may be published if enabled. " +
"If application metrics should never be empty, consider using 'WithRaiseOnEmptyMetrics'"
NoMetrics is what a metrics flush without metrics says, as Powertools Python says it (with the Go name of the option), for every provider.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.