Adding MaidBotApi
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Introduction
|
||||
Maidbot was created to give us the ability to get notifications on seq and other loggings. It has an api endpoint that can be used to queue a log. Once the log is consumed it queries our LoggingMatrix for the Application, Level, and Group. If a matrix is found the email is used to send a notification with the message of the log.
|
||||
|
||||
# Seq Debugging
|
||||
Since seq app can only be tested on seq, there is no way to debug locally. This adds a pain to testing the application. So if there is a need to test follow the following steps.
|
||||
|
||||
Local MaidBotApi Steps.
|
||||
1. Create your own test queue in QA Rabbit. Use the same exchange LCU.Logging.Direct and routing key for binding.
|
||||
2. Change appsettings to use your test queue.
|
||||
|
||||
Seq App Steps
|
||||
1. Make code adjustments to SeqToRabbit.
|
||||
2. Build
|
||||
3. Grab nuget package from bin.
|
||||
4. Change name of nuget to indicate it is for debugging.
|
||||
5. Go to QA server and to the seq nuget folder. (Currently C:\Program Files\Seq\Nuget)
|
||||
6. Add nuget file
|
||||
7. Go to QA seq --> settings --> Apps --> Install From Nuget
|
||||
8. Select "LocalMachine" as Feed.
|
||||
9. Add your test nuget package name and put as Package Id. (Doesn't require package version).
|
||||
10. Install.
|
||||
11. Add Instance
|
||||
12. Create a Title that indicates that it is Debuging/Testing.
|
||||
13. Add Stream that you wish to use to test. NOTE: Do not use information or other logging that occurs very frequently. If there is an issue with your app it will flood seq with errors.
|
||||
14. Add QA MaidBotApi url
|
||||
15. Select DebugMode to indicate that the raw log will be saved to our MaidBot DebugEventLog table.
|
||||
16. DO NOT select "Run the app on existing events" as this can cause a flood logs. (Unless fully aware what you are pulling in).
|
||||
17. Save Changes
|
||||
|
||||
|
||||
#App Integration Steps
|
||||
- Pull LCU.Api.Internal.MaidBotLib Nuget into project.
|
||||
- Add Context of desired property such as Group.
|
||||
- Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
|
||||
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
|
||||
.Fatal("Failure return status, message: {0} {1}", e.Message, e.StackTrace);
|
||||
- Use MaidBotApi swagger to create matrix to follow your app, desired level, and group.
|
||||
- In Seq create signal that will capture this log(If not already created).
|
||||
- Create instance that will watch this signal.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user