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 Sentry for Demo Error Tracking #15

Merged
merged 12 commits into from Sep 26, 2022
Merged

Conversation

bbengfort
Copy link
Contributor

@bbengfort bbengfort commented Sep 23, 2022

Scope of changes

Sentry integration and Quarterdeck API testing code with @daniellemaxwell.

This PR adds a lot of monitoring and logging to Ensign for debugging and performance testing purposes. It does go beyond what the story asks of it, but it is essential for Ensign MVP development and understanding what is happening on the server. I've added notes to help the review process. See acceptance criteria below.

I've also implemented a Grafana dashboard for this PR:

Screen Shot 2022-09-26 at 06 28 38

It contains event monitoring, gRPC monitoring, and Go process monitoring.

Fixes SC-9558

Type of change

  • new feature
  • bug fix
  • documentation
  • testing
  • technical debt
  • other (describe)

Acceptance criteria

I've added notes to help you in the review process; please resolve the notes when you've read them.

Files you can ignore:

  • containers/monitor/grafana/dashboards/ensign.json: contains the grafana dashboard description; see screenshot above.
  • go.mod and go.sum: deps added were go-sentry and cors middleware for gin.
  • pkg/utils/logger/grpc.go: copy and paste from grpclog to reduce the logging verbosity from the server

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have recompiled and included new protocol buffers to reflect changes I made
  • I have added new test fixtures as needed to support added tests
  • Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)
  • I have moved the associated Shortcut story to "Ready for Review"

Reviewer(s) checklist

  • Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.
  • I've resolved any outstanding notes from the author

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #9558: Add Sentry for Demo Error Tracking.

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #15 (239c17c) into main (500328b) will decrease coverage by 2.72%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   60.26%   57.53%   -2.73%     
==========================================
  Files          18       29      +11     
  Lines         916     1606     +690     
==========================================
+ Hits          552      924     +372     
- Misses        328      622     +294     
- Partials       36       60      +24     
Flag Coverage Δ
unittests 57.53% <ø> (-2.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ub.com/rotationalio/ensign/pkg/ensign/o11y/o11y.go 71.24% <0.00%> (-7.88%) ⬇️
...om/rotationalio/ensign/pkg/ensign/config/config.go 39.34% <0.00%> (-2.04%) ⬇️
...rotationalio/ensign/pkg/utils/logger/middleware.go 0.00% <0.00%> (ø)
...tationalio/ensign/pkg/quarterdeck/api/v1/errors.go 79.16% <0.00%> (ø)
...ationalio/ensign/pkg/quarterdeck/api/v1/options.go 0.00% <0.00%> (ø)
...ionalio/ensign/pkg/ensign/interceptors/recovery.go 100.00% <0.00%> (ø)
...nalio/ensign/pkg/ensign/interceptors/monitoring.go 3.93% <0.00%> (ø)
...tationalio/ensign/pkg/quarterdeck/api/v1/client.go 58.41% <0.00%> (ø)
....com/rotationalio/ensign/pkg/quarterdeck/status.go 90.00% <0.00%> (ø)
...b.com/rotationalio/ensign/pkg/utils/logger/grpc.go 0.00% <0.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bbengfort bbengfort changed the title part 1 of sentry maintenance Add Sentry for Demo Error Tracking Sep 23, 2022
Copy link
Contributor

@daniellemaxwell daniellemaxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following comments are related to the ensign/server.go file. To be honest, they may be a little nitpicky.

On line 113, the comment appears to have a typo where "...is metrics are enabled" is stated. I think using "...if metrics are enabled" may be clearer to readers.
On line 180, mainenance is declared as the variable name. Would it be clearer to readers if "maintenace" is used?
On line 191, the comment appears to have a typo where "endpoints" is spelled like "endpoings".

Everything else looked good to me.

@bbengfort
Copy link
Contributor Author

The following comments are related to the ensign/server.go file. To be honest, they may be a little nitpicky.

On line 113, the comment appears to have a typo where "...is metrics are enabled" is stated. I think using "...if metrics are enabled" may be clearer to readers. On line 180, mainenance is declared as the variable name. Would it be clearer to readers if "maintenace" is used? On line 191, the comment appears to have a typo where "endpoints" is spelled like "endpoings".

Everything else looked good to me.

I don't mind nitpicky/spelling/typo corrections at all! I'll go ahead and make those changes.

One thing you can do if you see stuff like that is use the "suggestion" feature in GitHub; that allows us to make all these changes a bit quicker; happy to go over that this afternoon if you'd like.

@daniellemaxwell
Copy link
Contributor

Going over the suggestion feature would be great! Thank you!

@bbengfort bbengfort merged commit 07474e1 into main Sep 26, 2022
@bbengfort bbengfort deleted the sc-9558/sentry-maintenance branch September 26, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants