MVP, working sentry scraper

This commit is contained in:
Mike Conrad
2025-05-18 20:44:42 -04:00
parent a34b0899ce
commit 8ea49772df
29 changed files with 724 additions and 481 deletions

View File

@ -18,4 +18,4 @@ export default class extends BaseSchema {
async down() {
this.schema.dropTable(this.tableName)
}
}
}

View File

@ -0,0 +1,47 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'replays'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.string('id').primary()
table.string('project_id')
table.jsonb('trace_ids')
table.jsonb('error_ids')
table.string('environment').nullable()
table.jsonb('tags')
table.jsonb('user')
table.jsonb('sdk')
table.jsonb('os')
table.jsonb('browser')
table.jsonb('device')
table.jsonb('ota_updates')
table.boolean('is_archived').nullable()
table.jsonb('urls')
table.jsonb('clicks')
table.integer('count_dead_clicks').nullable()
table.integer('count_rage_clicks').nullable()
table.integer('count_errors').nullable()
table.bigInteger('duration').nullable()
table.timestamp('finished_at', { useTz: true }).nullable()
table.timestamp('started_at', { useTz: true }).nullable()
table.integer('activity').nullable()
table.integer('count_urls').nullable()
table.string('replay_type')
table.integer('count_segments').nullable()
table.string('platform').nullable()
table.jsonb('releases')
table.string('dist').nullable()
table.integer('count_warnings').nullable()
table.integer('count_infos').nullable()
table.boolean('has_viewed')
table.timestamp('created_at', { useTz: true }).defaultTo(this.now())
table.timestamp('updated_at', { useTz: true }).defaultTo(this.now())
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}