yext / edward

A tool for managing local microservice instances
http://engblog.yext.com/edward/
MIT License
171 stars 32 forks source link

edward tiplog command #163

Closed b1lly closed 5 years ago

b1lly commented 6 years ago

A proposal for a feature enhancement:

Create a new command, perhaps called "tiplog", that enables edward to spit out the last 5-10 lines of each service running.

The output can separate each output with an obvious "title" of the service name.

e.g.

[billy] edward tiplog

### Service: locationsstorm: (COLOR?) ### Execution exception (In /app/domain/models/BOOBAR.java around line 107) NullPointerException occurred : null

play.exceptions.JavaExecutionException: null at play.mvc.ActionInvoker.invoke(ActionInvoker.java:485) ~[play.jar:?] at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:467) ~[play.jar:?] at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:436) ~[play.jar:?] at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159) ~[play.jar:?] at Invocation.HTTP Request(Play!) ~[?:?] Caused by: java.lang.NullPointerException ... 4 more

### Service: fakestorm: (COLOR?) ###

Execution exception (In /app/domain/models/BAAAAARBAR.java around line 107) NullPointerException occurred : null

play.exceptions.JavaExecutionException: null at play.mvc.ActionInvoker.invoke(ActionInvoker.java:485) ~[play.jar:?] at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:467) ~[play.jar:?] at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:436) ~[play.jar:?] at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159) ~[play.jar:?] at Invocation.HTTP Request(Play!) ~[?:?] Caused by: java.lang.NullPointerException ... 4 more

### Service: someOtherService: (COLOR?) ###

2018-06-22 13:49:38,174 INFO [play-thread-1] play - RUNNING SMOOTH!

theothertomelliott commented 5 years ago

Is this similar to any other tools? If there's something I can base this on it would be super handy.

Otherwise I'll use the description as spec :)

b1lly commented 5 years ago

I just kind've invented it. Not sure if any other tools support it.

I think the idea is that:

If you have multiple services running, and an exception is thrown or something is crapped out, it becomes hard to to figure out which one decided to poop. For instance, you'd have to investigate each one of the services logs one at a time until you found it (if you weren't aware of what it could be).

So, the value in the command would be to just see the "tip" (e.g. last few lines) of the logs for ALL of the services running, in ONE command, so that its easy to narrow down.

If it were able to spit out the tail of all of the logs in one command and organize them by service, then I'd be able to identify which one caused the problem and then debug from there more quickly.

theothertomelliott commented 5 years ago

I've put together an initial implementation of this on the develop branch, feel free to take a look! You can install it by opening your edward dir and building from origin/develop:

$ cd $GOPATH/src/github.com/yext/edward
$ git fetch
$ git checkout develop
$ go install
theothertomelliott commented 5 years ago

Released with 1.8.18.