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

Events: convert from hclog to events #1409

Merged
merged 55 commits into from
Jul 28, 2021

Conversation

jimlambrt
Copy link
Collaborator

@jimlambrt jimlambrt commented Jul 21, 2021

This PR converts all the existing logging to events. The PR shouldn't be merged until #1390 is merged and we're ready for events to be generally available.

In that vein, this PR removes the BOUNDARY_DEVELOPER_ENABLE_EVENTS from events.WriteSysEvent(...), event.WriteObservation(...) and event.WriteError(...) but it keeps it in place for WriteAudit(...) which means audit events will not be enabled by this PR.

Contributors which relied on trace, debug and warn logging for instrumentation are encouraged to review the conversion of their logging contributions to events.

Note: the conversion from logging to events means that log levels are not longer a thing in Boundary and operators will need to use event filtering to control which events are emitted.

… feature flag BOUNDARY_DEVELOPER_ENABLE_EVENTS
@jimlambrt jimlambrt requested review from jefferai and louisruch July 26, 2021 14:51
@jimlambrt jimlambrt requested a review from tmessi July 26, 2021 16:56
vancluever
vancluever previously approved these changes Jul 26, 2021
…ller and workers for things like tickers, jobs and status
…ith a timeout. otherwise the event broker doesn't properly track success thresholds and we get false positive errors
@jimlambrt
Copy link
Collaborator Author

Reviewers: I'm calling out a few specific commits for re-review:

  • 4e17657 add waitgroups to manage shutdown of goroutines started by the controller and workers for things like tickers, jobs and status
  • d9cb92b when sending events: detect ctx cancellation and change it to a ctx with a timeout. otherwise the event broker doesn't properly track success thresholds and we get false positive errors

@jimlambrt
Copy link
Collaborator Author

@tmessi ty! I've converted them to references.

@louisruch I've refactored the remaining calls to Start(...) in the tests. ty!

Copy link
Member

@jefferai jefferai left a comment

Choose a reason for hiding this comment

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

Nice!!!

@jimlambrt jimlambrt merged commit 70ad081 into main Jul 28, 2021
@jimlambrt jimlambrt deleted the jimlambrt-convert-from-hclog-to-events branch July 28, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants