Update log schemas for field reference (#34432)

* update log schemas for field reference

* rm unnecessary wh log
This commit is contained in:
Jordi Enric authored and GitHub committed 2025-03-26 12:51:58 +01:00
1 parent 3831347d4b
commit 42bc29ef87
1 file changed
+54 -3
+54 -3
View File
@@ -1,6 +1,28 @@
const schemas = [
type LogTable =
| 'edge_logs'
| 'postgres_logs'
| 'function_logs'
| 'function_edge_logs'
| 'auth_logs'
| 'realtime_logs'
| 'storage_logs'
| 'postgrest_logs'
| 'supavisor_logs'
| 'pgbouncer_logs'
| 'pg_cron_logs'
type LogSchema = {
name: string
reference: LogTable
fields: {
path: string
type: string
}[]
}
const schemas: LogSchema[] = [
{
name: 'API Edge',
name: 'API Gateway',
reference: 'edge_logs',
fields: [
{ path: 'id', type: 'string' },
@@ -229,13 +251,42 @@ const schemas = [
],
},
{
name: 'Supavisor',
name: 'Supavisor (Shared Pooler)',
reference: 'supavisor_logs',
fields: [
{ path: 'event_message', type: 'string' },
{ path: 'id', type: 'string' },
{ path: 'timestamp', type: 'datetime' },
{ path: 'metadata.context.application', type: 'string' },
{ path: 'metadata.context.domain', type: 'string[]' },
{ path: 'metadata.context.file', type: 'string' },
{ path: 'metadata.context.function', type: 'string' },
{ path: 'metadata.context.gl', type: 'string' },
{ path: 'metadata.context.line', type: 'number' },
{ path: 'metadata.context.mfa', type: 'string[]' },
{ path: 'metadata.context.module', type: 'string' },
{ path: 'metadata.context.pid', type: 'string' },
{ path: 'metadata.context.time', type: 'number' },
{ path: 'metadata.context.vm.node', type: 'string' },
{ path: 'metadata.db_name', type: 'string' },
{ path: 'metadata.instance_id', type: 'string' },
{ path: 'metadata.level', type: 'string' },
{ path: 'metadata.project', type: 'string' },
{ path: 'metadata.region', type: 'string' },
{ path: 'metadata.type', type: 'string' },
{ path: 'metadata.user', type: 'string' },
],
},
{
name: 'PgBouncer (Dedicated Pooler)',
reference: 'pgbouncer_logs',
fields: [
{ path: 'id', type: 'string' },
{ path: 'event_message', type: 'string' },
{ path: 'file', type: 'string' },
{ path: 'timestamp', type: 'datetime' },
{ path: 'metadata.host', type: 'string' },
{ path: 'project', type: 'string' },
],
},
]