improved
Hermes Version 2 Release
7 months ago by Charlie Plate
The Hermes V2 update introduces a series of enhancements focusing on logging, communication with Graphite, and error handling.
BREAKING CHANGES
Additional Endpoints
Hermes V2 extends its integration with Graphite through additional API endpoints, enhancing its capability to manage data flow and interactions more effectively:
PATCH /profile/{publicId}
: Updates specific profile details.POST /changes/acknowledgement
: Acknowledges changes received from Graphite.GET /changes/connections
: Retrieves information about current connections.POST /adapter/passthrough/{interface}
: Enables log passthrough from Hermes to GraphitePOST /adapter/long-poll/{interface}
: Initiates long-polling on an interface to get near real-time integration requests
Logging Configuration
- Array Configuration: The logging setup now requires an array of logger objects, allowing for the creation of logs to various outputs, such as file-based and stdout logging, tailored to specific needs.
- Logger Object Schema:
{
"level": "debug | info | warn | error",
"outputPath": "path/to/your/log/file.log | stdout",
"jsonLogging": true | false
}
- Example Configuration: Below is an example showcasing a setup for detailed debugging in JSON format, output to both a file and the standard output.
{
"logging": [
{
"level": "debug",
"outputPath": "path/to/your/log/file.log",
"jsonLogging": true
},
{
"level": "debug",
"outputPath": "stdout",
"jsonLogging": true
}
]
}
Enhancements
Logging
- Flexibility & Granularity: Transitioned from Zap to log/slog for enhanced flexibility. Configurations now offer finer control over log generation, including verbosity and format.
- Passthrough Logging: Newly introduced capability to send logs periodically to a remote server for centralized monitoring.
Communication Improvements
- Dedicated Endpoints: Improved communication flow by calling dedicated endpoints, allowing for more precise control over message timing.
- Log Transmission: An endpoint dedicated to log transmission has been added, allowing for future enhancements to view the current integration status directly in the user interface.
- Exponential Backoff: Implements a backoff strategy for retryable errors (
408
,429
,500
,502
,503
,504
), significantly reducing errors due to downtime or internal server errors.
Error Handling
- Robustness: Enhanced error recovery mechanisms, including adapter restart capabilities upon failure.
- Crash Logging: Introduces unique crash logs for unrecoverable errors.
- Improved Error Feedback: Enhanced error messaging for issues like database timeouts, ensuring clearer communication back to Graphite.
Testing Suite
- Comprehensive Testing: A new testing suite designed to test adapter functionalities, ensuring reliability and performance as we continue to make improvements to the adapter.
This release aims to address key areas of improvement identified in previous versions, providing a more robust, efficient, and user-friendly experience.
Installation
wget https://storage.googleapis.com/graphite-hermes/develop/latest/hermes-go.linux.zip
unzip hermes-go.linux.zip
cd hermes
chmod +x hermes && ./hermes --version
Before running the Hermes application, ensure your configuration is updated according to the logging breaking changes above.