Improve error handling in the CreateTag, CreateTagInBatch, and DeleteTag functions by utilizing a new utility function. Simplify logging and error management, ensuring more consistent error responses throughout these operations.
Add OpenTelemetry integration to the database client by creating a `setupTelemetry` function. Initialize a tracer and configure logging with the otellogrus hook. Call this function during the connection process to enable tracing and logging for database operations.
- Added functionality
- Add connection checks to `CreateUserSource`, `UpdateUserSource`, `GetUserSourceByID`, and `DeleteUserSource` functions.
- Introduce validation for empty and improperly formatted IDs in `UpdateUserSource`, `GetUserSourceByID`, and `DeleteUserSource`.
- Handle duplicate key errors and record not found errors with appropriate custom error messages.
Implement connection to PostgreSQL database using GORM. Embed SQL migrations and handle migration execution with logging capabilities. Define configuration structure for database settings.