Skip to content

Add alerts, docs, and logging improvements#546

Merged
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
parkerwinner:fix/alerts-docs-logging
Jun 28, 2026
Merged

Add alerts, docs, and logging improvements#546
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
parkerwinner:fix/alerts-docs-logging

Conversation

@parkerwinner

Copy link
Copy Markdown
Contributor

This PR enhances the server with comprehensive environment documentation, duplicate alert validation, structured logging utilities, and indexer startup observability.

Changes

Documentation:

  • Added complete environment variables reference with all required and optional variables grouped by category
  • Included security notes for credentials requiring regular rotation
  • Documented types, defaults, and descriptions for all config vars

Price Alerts:

  • Implemented duplicate alert detection returning 409 when identical active alert exists
  • Added integration test verifying duplicate prevention and database state
  • Ensures only one active alert per creator/wallet/price/direction combination

Logging Utilities:

  • Added ledgerLogContext helper for consistent structured logging of ledger sequence and timestamp
  • Formats timestamp as ISO 8601 UTC across all log entries
  • Includes comprehensive unit tests

Indexer Observability:

  • Added startup sync state logging showing last processed ledger and network lag
  • Calculates estimated catchup time based on 5 seconds per ledger
  • Emits warning for fresh starts with no processed ledgers
  • Includes full unit test coverage

Testing

All new features include integration or unit tests verifying correct behavior and error handling.

Closes #542
Closes #541
Closes #540
Closes #538

- Add comprehensive environment variables documentation with security notes
- Add integration test for duplicate price alert registration (409 response)
- Add ledgerLogContext helper for consistent structured logging of ledger data
- Add indexer startup sync state logging with lag calculation
- Implement duplicate alert validation in alert service

Closes accesslayerorg#542, accesslayerorg#541, accesslayerorg#540, accesslayerorg#538
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@parkerwinner Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093 Chucks1093 merged commit 67708a1 into accesslayerorg:main Jun 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment