Commit Graph
26 Commits
Author SHA1 Message Date
windyboy 7f44b5389d Enhance observability and error handling in NATS integration. Introduce comprehensive OpenTelemetry support with environment-based sampling and semantic attributes for tracing and metrics. Implement an advisory dead-letter queue (DLQ) handler for managing message delivery failures. Update NATS consumer to utilize structured logging and improve error handling strategies. Refactor configuration files for OpenTelemetry collector in both development and production environments, ensuring robust telemetry integration. Enhance documentation to reflect new features and best practices for observability. 2025-11-18 11:47:35 +08:00
windyboy 61647cf849 Update Prometheus configuration and enhance monitoring capabilities. Refactor docker-compose.dev.yml to dynamically generate target configurations for the CAATSM receiver. Modify Makefile and Taskfile to allow setting the monitoring address via environment variables. Update observability settings in config.dev.toml and Prometheus scrape configurations to improve integration with the monitoring stack. Enhance CLI options for monitoring address and disable monitoring features as needed. 2025-11-17 17:53:24 +08:00
windyboy 704c7b80f6 Add repository guidelines and enhance documentation for project structure, build commands, coding standards, and testing practices. Introduce AGENTS.md for contributor guidance, update README.md to reference new guidelines, and improve configuration documentation for NATS modes. Update Makefile and Taskfile with clearer run commands and requirements for development and production modes. Add production deployment guide and improve logging configuration for better observability. 2025-11-17 16:25:23 +08:00
windyboy 204217015d Add configuration for Code Review Automation and enhance .gitignore. Introduce .coderabbit.yml for automated reviews with profiles for correctness, maintainability, security, and performance. Update paths to include relevant directories and exclude generated files. Modify .gitignore to include coverage reports and generated files. Refactor Docker Compose to use updated paths for database initialization scripts. Update Go module dependencies and enhance Makefile with new code generation tasks. Transition domain models to a new DTO structure for better separation of concerns. 2025-11-17 11:47:23 +08:00
windyboy 12fda00df9 Introduce seed-telegrams tool for generating synthetic telegrams for testing and development. Enhance README with detailed usage instructions, command-line parameters, and examples. Add unit tests for telegram generation and status selection logic to ensure robustness. Update documentation to reflect new features and usage scenarios. 2025-11-16 17:24:16 +08:00
windyboy e27328378a Revise observability features by introducing new health and liveness endpoints (/livez and /readyz), updating Prometheus metrics to track NATS consumer pending messages, and enhancing telemetry integration for better monitoring. Update documentation to reflect these changes and ensure consistency in metric naming conventions. 2025-11-16 13:14:46 +08:00
windyboy e440c057b5 Enhance Ginkgo unit test execution by specifying directories for tests in Makefile and Taskfile. Update README to reflect changes in test command usage and clarify the structure of unit tests. 2025-11-16 10:18:40 +08:00
windyboy 53208997e8 Integrate monitoring server for observability, adding health and metrics endpoints. Update configuration to enable monitoring features and enhance README with deployment examples for Kubernetes and systemd. Refactor application initialization to include monitoring server setup and improve error handling in message processing metrics. 2025-11-15 16:30:29 +08:00
windyboy 184c5453fb Expand Docker Compose development stack to include observability tools: OpenTelemetry Collector, Jaeger, Prometheus, and Grafana. Update README with new usage instructions for the observability stack and enhance Taskfile for streamlined development commands. Introduce sample telegram generation utility and improve NATS configuration for core and JetStream modes. 2025-11-15 12:08:26 +08:00
windyboy 359e7694ab Update dependencies, enhance NATS consumer configuration, and improve error handling in message processing. Introduce telemetry support with OpenTelemetry for tracing and metrics. Refactor README to include new configuration options and update tests for improved coverage of error scenarios. 2025-11-15 09:01:24 +08:00
windyboy 02e54a2670 Refactor application initialization to load configuration and enhance message processing. Introduce effective subscription topic handling and improve error management in NATS consumer. Update tests for publisher error handling and add new dependency injection method for app initialization. 2025-11-14 22:43:04 +08:00
windyboy 9cce4610b6 Enhance NATS configuration and error handling. Introduce stream limits and consumer rules in configuration files. Refactor message processing to handle permanent errors. Update README and development configuration to reflect changes. Add tests for new error handling mechanisms. 2025-11-14 21:42:04 +08:00
windyboy a574cfcf27 Upgrade Go version to 1.23.0 and update dependencies. Introduce new application structure with Clean Architecture principles, including message processing, NATS integration, and PostgreSQL repository. Add configuration management using Koanf and structured logging with Zap. Remove legacy GraphQL integration and related files. Implement dependency injection with Google Wire. 2025-11-14 08:42:26 +08:00
windyboy da1d713946 🚀 Integrate Hasura service into NATS message processing. 2024-08-14 11:48:39 +08:00
windyboy 6b44c2d7a0 refactor subscribe (#4)
*  Refactor nats subscribe method and remove unused argument.

*  Add logging for message insertion 📝
2024-08-14 09:40:47 +08:00
windyboy 8a4c46aa34 update handler (#2)
* 🔧 Remove commented-out regex patterns and initialization in config.

*  Add NATS message publisher with configuration 📩🚀

*  Add new PlainTextMarshaler and refactor handler in nats package.
2024-08-12 17:47:34 +08:00
windyboy bef663ca3d refactor: Update Civial Aviation Authority Telegram message processor usage in main.go and add NATS server connection logging 2024-08-05 15:58:46 +08:00
windyboy 3c37410737 refactor: Update Nats handler and Hasura repository initialization 2024-08-05 11:42:33 +08:00
windyboy 1a858cf19c refactor: Remove redundant code and improve configuration handling in main.go 2024-08-05 11:23:22 +08:00
windyboy 3c917c93af refactor: Update main.go to process Civial Aviation Authority Telegram messages and add CLI flag for Nats server address and topic 2024-08-05 10:58:20 +08:00
windyboy c54bcbc0a8 refactor: Update Taskfile.yml to use lowercase variable names for consistency 2024-08-05 10:11:33 +08:00
windyboy 766925f7f9 refactor: Update nats subscription handling
The code changes in `sub.go` update the handling of NATS subscriptions. The `Subscribe` function now takes in a `config` parameter, allowing for more flexibility in configuring the subscription. Additionally, the `Subscribe` function now uses the `handler` and `marshaler` parameters to handle incoming messages and marshal/unmarshal data, respectively. These changes improve the modularity and extensibility of the code when working with NATS subscriptions.
2024-07-30 10:25:59 +08:00
windyboy 738ce16f34 refactor: Update ARR body parsing logic
The code changes in `pattern_test.go` update the ARR body parsing logic. The message body parsing now correctly handles ARR bodies with a different pattern format. This ensures accurate extraction of data based on patterns and improves the overall functionality of the code.
2024-07-24 11:07:04 +08:00
windyboy 0391f9f481 refactor: Update ARR body parsing logic
The code changes in `aviation_parser_test.go` update the ARR body parsing logic. The `ParseHeader` function now correctly handles ARR bodies with optional time components. This ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
2024-07-22 12:42:30 +08:00
windyboy 24c9beeb13 refactor: Update NATS subscription logic and configuration
The code changes in `main.go` update the NATS subscription logic and configuration. The `Subscribe` function now uses the `NatsHandler` struct to handle the subscription. The `NewNatsHandler` function is added to create a new instance of the `NatsHandler` with the provided configuration. The configuration values are passed to the `NatsSubscriber` constructor to set up the NATS subscription. This refactor improves the modularity and readability of the NATS subscription code.
2024-07-21 23:09:29 +08:00
windyboy dbbf6133be init 2024-07-19 20:02:18 +08:00