-
Notifications
You must be signed in to change notification settings - Fork 25
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
Refactoring the Logging Logic #557
Conversation
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
consolidated logging and moved rpc logging to core Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
grpc generation was failing Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
@v0lkan, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@@ -4,7 +4,7 @@ | |||
[![Version](https://img.shields.io/github/v/release/vmware-tanzu/secrets-manager?color=blueviolet)](https://github.com/vmware-tanzu/secrets-manager/releases) | |||
[![Contributors](https://img.shields.io/github/contributors/vmware-tanzu/secrets-manager.svg?color=orange)](https://github.com/vmware-tanzu/secrets-manager/graphs/contributors) | |||
[![Slack](https://img.shields.io/badge/slack-vsecm-brightgreen.svg?logo=slack)](https://join.slack.com/t/a-101-103-105-s/shared_invite/zt-287dbddk7-GCX495NK~FwO3bh_DAMAtQ) | |||
[![Twitch](https://img.shields.io/twitch/status/zerotoherodev)](https://twitch.tv/ZeroToHeroDev) | |||
[![Twitch](https://img.shields.io/twitch/status/vadidekivolkan)](https://twitch.tv/vadidekivolkan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my new Twitch (and Twitter) alias; older links were resulting in 404 (instead of a permanent redirect)
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
@v0lkan, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
"github.com/vmware-tanzu/secrets-manager/core/probe" | ||
) | ||
|
||
func main() { | ||
id := "VSECMSAFE" | ||
id, err := crypto.RandomString(8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a random id and assign it to the context to pass through the chain of requests and responses.
this id will preserve through the sequence of actions related to this particular command execution.
@@ -30,7 +32,7 @@ func isSentinel(j audit.JournalEntry, cid string, w http.ResponseWriter, spiffei | |||
return true | |||
} | |||
|
|||
j.Event = audit.EventBadSvid | |||
j.Event = event.BadSpiffeId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number of these event constants were increasing; and also we started using some common logging utilities; so I felt it’s time to move even-related constants to their own package too.
move context of the init command a level up in the hierarchy Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
@v0lkan, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
fixed Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
@v0lkan, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
} | ||
|
||
ctx, cancel := context.WithCancel( | ||
context.WithValue(context.Background(), "correlationId", &id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the correlation id as soon as the execution chain starts, and reusing it via the context.
Signed-off-by: Volkan Özçelik <ovolkan@vmware.com>
@v0lkan, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Refactoring the Logging Logic
Description
This PR moves the gRPC log to the core package and introduces a bunch of documentation updates and minor code fixes.
Test Policy Compliance
Code Quality
to understand.
Documentation
Checklist
Before you submit this PR, please make sure:
especially the test policy.
under the project’s license.
By submitting this pull request, you confirm that my contribution is made under
the terms of the project’s license and that you have the authority to grant
these rights.
Thank you for your contribution to VMware Secrets Manager
🐢⚡️!