-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add minimal rfq relayer query interface (#2772)
--------- Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com>
- Loading branch information
Showing
15 changed files
with
1,567 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,74 @@ | ||
# Op Bot is a slack bot | ||
# OpBot | ||
|
||
OpBot is a Slack bot written in Go that interacts with the Signoz trace API to provide various functionalities, including searching for transactions based on user-provided tags. This bot is designed to help teams monitor and manage their operations more effectively by integrating with Slack and Signoz. | ||
|
||
## Features | ||
|
||
- **Slack Integration**: Interact with the bot directly from Slack. | ||
- **Signoz Integration**: Search for transactions and traces using the Signoz API. | ||
- **Configuration Management**: Easily manage configuration through YAML files. | ||
- **Metrics Handling**: Integrated with metrics handling for better monitoring. | ||
|
||
## Installation | ||
|
||
1. **Clone the repository**: | ||
```sh | ||
git clone https://github.com/synapsecns/sanguine.git | ||
cd sanguine/contrib/opbot | ||
``` | ||
|
||
2. **Install dependencies**: | ||
Ensure you have Go installed (version 1.22.4 or later). Then, run: | ||
```sh | ||
go mod tidy | ||
``` | ||
|
||
3. **Build the bot**: | ||
```sh | ||
go build -o opbot main.go | ||
``` | ||
|
||
## Configuration | ||
|
||
OpBot uses a YAML configuration file to manage its settings. The configuration file should be named `config.yml` and placed in the same directory as the executable. | ||
|
||
### Example `config.yml` | ||
|
||
```yaml | ||
slack_bot_token: "your-slack-bot-token" | ||
slack_app_token: "your-slack-app-token" | ||
signoz_email: "your-signoz-email" | ||
signoz_password: "your-signoz-password" | ||
signoz_base_url: "https://signoz.example.com" | ||
``` | ||
|
||
### Configuration Fields | ||
|
||
- `slack_bot_token`: The token for your Slack bot. | ||
- `slack_app_token`: The token for your Slack app. | ||
- `signoz_email`: The email address used to log in to Signoz. | ||
- `signoz_password`: The password used to log in to Signoz. | ||
- `signoz_base_url`: The base URL for the Signoz API. | ||
|
||
## Usage | ||
|
||
1. **Start the bot**: | ||
```sh | ||
./opbot start --config config.yml | ||
``` | ||
|
||
2. **Interact with the bot in Slack**: | ||
- Use commands to search for transactions in Signoz. | ||
- Example command: `/opbot search --tag key:value` | ||
|
||
## Development | ||
|
||
### Directory Structure | ||
|
||
- **`cmd`**: Contains the command line interface for the bot. | ||
- **`config`**: Provides functionality to read and write configuration files. | ||
- **`botmd`**: Contains the main bot server implementation. | ||
- **`metadata`**: Provides metadata services for the bot. | ||
- **`signoz`**: Contains the Signoz client for interacting with the Signoz API. | ||
|
||
Feel free to reach out if you have any questions or need further assistance! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.