Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging of sent messages #29

Open
kapil1garg opened this issue May 6, 2024 · 2 comments
Open

add logging of sent messages #29

kapil1garg opened this issue May 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kapil1garg
Copy link
Contributor

in each of the feedbackFunctions, would be useful for debugging to know what messages were actually sent. Probably can instrument the sendSlackMessageToProjectChannel, sendSlackMessageToSigChannel, and sendSlackMessageToPeople functions.

Simple data structure:

// MessageLogSchema
{
  timestamp: Date as String // time when message was sent
  target {
    type: project|sig|people,
    projectName: String // project name if type is project; optional
    sigName: String // SIG name if type is SIG; optional
    people: String[] // list of people message was sent to if type is people; optional
  }
  message: String // message that was sent
  error: Object as String // error if happens
}
@kapil1garg kapil1garg added the enhancement New feature or request label May 6, 2024
@kapil1garg
Copy link
Contributor Author

801eb35 tried to add this, but I kept hitting a ReferenceError: MessageLog is not defined when adding it to the feedback functions. I added it to the postToStudioAPI function for now, but that doesn't listen for any errors in the request.

some options:

  • add a try, catch to postToStudioAPI to listen for any errors there and capture that
  • get the ExecutionEnv to accept MessageLog somehow. Might need to include Mongoose (seems like I use this. to refer to the studio API call)

@kapil1garg
Copy link
Contributor Author

Need to add this to all message functions -- only in message a list of people right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant