-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Feat/log/uuid #4392
Feat/log/uuid #4392
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod | |
if err != nil { | ||
return nil, err | ||
} | ||
defer log.EventBegin(ctx, "resolvePathComponents", logging.LoggableMap{"parts": parts, "cid": h}).Done() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the case that there is an error in the execution of this method, do we want to add a loggable error to the event log (see L143)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, yes. We'd probably also want to log the error from L146 as well. Also, this event should probably go at the top and include any errors from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can save the result value of |
||
|
||
log.Debug("resolve dag get") | ||
nd, err := s.DAG.Get(ctx, h) | ||
|
@@ -154,6 +155,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod | |
// would retrieve "baz" in ("bar" in ("foo" in nd.Links).Links).Links | ||
func (s *Resolver) ResolveLinks(ctx context.Context, ndd node.Node, names []string) ([]node.Node, error) { | ||
|
||
defer log.EventBegin(ctx, "resolveLinks", logging.LoggableMap{"names": names}).Done() | ||
result := make([]node.Node, 0, len(names)+1) | ||
result = append(result, ndd) | ||
nd := ndd // dup arg workaround | ||
|
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.
I would move this down below the defer cancel.