Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/backup-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

timestamp="$(date -u +%Y%m%dT%H%M%SZ)"
backup_dir="${BACKUP_DIR:-backups}"
mkdir -p "$backup_dir"

output_path="${backup_dir}/vortex-backup-${timestamp}.sql.gz"
pg_dump "${DATABASE_URL:?DATABASE_URL must be set}" | gzip -9 > "$output_path"

echo "wrote ${output_path}"
4 changes: 4 additions & 0 deletions src/common/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export class Histogram {

/** Singleton registry — import and use from any module. */
export const MetricsRegistry = {
health: {
databaseChecksTotal: new Counter(),
sorobanRpcChecksTotal: new Counter(),
},
sweeper: {
/** Total number of intents expired across all sweeps. */
expiredTotal: new Counter(),
Expand Down
6 changes: 6 additions & 0 deletions src/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ const sdk = new NodeSDK({
"@opentelemetry/instrumentation-http": {
enabled: true,
},
"@opentelemetry/instrumentation-undici": {
enabled: true,
},
"@opentelemetry/instrumentation-express": {
enabled: true,
},
"@opentelemetry/instrumentation-nestjs-core": {
enabled: true,
},
"@opentelemetry/instrumentation-pg": {
enabled: true,
},
}),
],
});
Expand Down