I'd like to see the application_name in the perfdata, something like that:
POSTGRES_LONGEST_QUERY CRITICAL: mydatabase (pg_dump): 6h26m28s
Knowing at once if this is a backup or a pgadmin4 or a batch is useful when filtering out the warnings in the morning.
Probably not as default, as it may break some graphs.
We already retrieve the application_name to exclude some queries.