-
Notifications
You must be signed in to change notification settings - Fork 11
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 Basic OTEL Tracing to TFBuddy #26
Conversation
fe33056
to
9b834f5
Compare
@sl1pm4t @davidwin93 if i fix this merge request is this good to merge? |
cmd/root.go
Outdated
Version: pkg.GitTag, | ||
CommitSHA: pkg.GitCommit, | ||
} | ||
fmt.Printf("enabled: %v\thost: %s\tport: %s\n", enableOtel, otelHost, otelPort) |
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.
instead of fmt
could these use log
If you resolve the merge conflicts I think this would be good to merge. Solid work! |
9b834f5
to
2adff47
Compare
Signed-off-by: Matt Plachter <matthew.plachter@zapier.com>
2adff47
to
0b187ce
Compare
Signed-off-by: Matt Plachter <matthew.plachter@zapier.com>
pkg/gitlab_hooks/hook_worker.go
Outdated
@@ -39,14 +40,17 @@ func NewGitlabEventWorker(h *GitlabHooksHandler, js nats.JetStreamContext) *Gitl | |||
} | |||
|
|||
func (w *GitlabEventWorker) processNoteEventStreamMsg(msg *NoteEventMsg) error { | |||
ctx, span := otel.Tracer("hooks").Start(msg.Context, "CheckForMergeConflicts") |
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.
Is CheckForMergeConflicts correct?
pkg/vcs/github/client.go
Outdated
// This is a NoOp on GitHub | ||
return nil | ||
} | ||
|
||
func (c *Client) AddMergeRequestDiscussionReply(prID int, fullName, discussionID, comment string) (vcs.MRNote, error) { | ||
func (c *Client) AddMergeRequestDiscussionReply(ctx context.Context, prID int, fullName, discussionID, comment string) (vcs.MRNote, error) { | ||
ctx, span := otel.Tracer("TFC").Start(ctx, "ApplyMergeRequestDiscussionReply") |
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.
Was this meant to be AddMergeRequestDiscussionReply ?
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.
Yeah we might have renamed the method good catch
Signed-off-by: Matt Plachter <matthew.plachter@zapier.com>
* add otel tracing to tfbuddy Signed-off-by: Matt Plachter <matthew.plachter@zapier.com> * change over from fmt to log Signed-off-by: Matt Plachter <matthew.plachter@zapier.com> * fix trace names Signed-off-by: Matt Plachter <matthew.plachter@zapier.com> --------- Signed-off-by: Matt Plachter <matthew.plachter@zapier.com>
Add Tracing to TFBuddy
Currently waiting on this sl1pm4t/gongs#3 to be merged than I'll update and sign DCO