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

Thread contexts down the stack #174

Closed
arschles opened this issue Jun 14, 2018 · 9 comments
Closed

Thread contexts down the stack #174

arschles opened this issue Jun 14, 2018 · 9 comments
Labels
good first issue Great issues for new Athenians to work on! refactor work to do to refactor code

Comments

@arschles
Copy link
Member

arschles commented Jun 14, 2018

Ref: #170 (comment)

This also greatly helps us with tracing. cc/ @bketelsen

Here's an example on how to add a tracing span to a function:

func foo(ctx context.Context) {
    sp, ctx := buffet.ChildSpan("storage.save",context)
    defer sp.Close()
    // do stuff with ctx
@arschles
Copy link
Member Author

Definitely don't have to do this all in one PR. That would be a big refactor!

@arschles arschles added the refactor work to do to refactor code label Jun 14, 2018
@arschles arschles added good first issue Great issues for new Athenians to work on! olympus labels Jun 21, 2018
@arschles arschles mentioned this issue Jun 24, 2018
5 tasks
@ghost ghost mentioned this issue Jul 7, 2018
@ghost
Copy link

ghost commented Jul 7, 2018

I'm thinking if we start with just threading the context, not adding tracing as well, it should be pretty easy. Start in each app and only change one interface per PR.

@bketelsen
Copy link
Contributor

that's a nice logical way to do this 👍

@tbpg
Copy link
Contributor

tbpg commented Jul 23, 2018

I'll work on storage.Lister. A couple notes for anyone else who's working on updating an interface:

  • You can search for interface implementations using grep -R -E 'func \(.+ List\(' . (you may want to restrict to pkg to avoid the vendor directory).
  • Alternatively, update the interface, run go build ./..., and see what breaks. 😛

@arschles
Copy link
Member Author

arschles commented Jul 23, 2018 via email

@manugupt1
Copy link
Member

#346

The above PR fixes it!

@manugupt1
Copy link
Member

Ref: #392

@arschles
Copy link
Member Author

arschles commented Aug 8, 2018

@manugupt1 since #346 is done, do you think we can close this issue?

@manugupt1
Copy link
Member

manugupt1 commented Aug 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Great issues for new Athenians to work on! refactor work to do to refactor code
Projects
None yet
Development

No branches or pull requests

4 participants