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

discoverd: Log broadcast events #1801

Merged
merged 1 commit into from Sep 1, 2015

Conversation

Projects
None yet
2 participants
@lmars
Copy link
Member

lmars commented Sep 1, 2015

This will make it easier to debug issues around potentially not receiving service events in the client.

Example:

2015/09/01 14:27:20 discoverd listening for HTTP on :1111
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting up event" component=discoverd fn=broadcast service=discoverd instance.id=bac41f57798d1ce9219b9b1d2f67a7d8 instance.addr=172.31.8.74:1111
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast service=discoverd instance.id=bac41f57798d1ce9219b9b1d2f67a7d8 instance.addr=172.31.8.74:1111
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting service_meta event" component=discoverd fn=broadcast service=flannel service_meta.index=6
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting service_meta event" component=discoverd fn=broadcast service=flannel service_meta.index=7
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting up event" component=discoverd fn=broadcast service=flannel instance.id=fecd491e8eba906df37309dbcff645fd instance.addr=172.31.8.74:5002
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast service=flannel instance.id=fecd491e8eba906df37309dbcff645fd instance.addr=172.31.8.74:5002
2015/09/01 14:27:20 discoverd listening for DNS on 100.100.28.1:53
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting up event" component=discoverd fn=broadcast service=flynn-host instance.id=26c9bc7cef5b17602e394ae005cdff8c instance.addr=172.31.8.74:1113
t=2015-09-01T14:27:20+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast service=flynn-host instance.id=26c9bc7cef5b17602e394ae005cdff8c instance.addr=172.31.8.74:1113
t=2015-09-01T14:27:21+0000 lvl=info msg="broadcasting up event" component=discoverd fn=broadcast service=postgres instance.id=939e596395b31bf342cf097db8669cd4 instance.addr=100.100.28.2:5432
t=2015-09-01T14:27:21+0000 lvl=info msg="broadcasting service_meta event" component=discoverd fn=broadcast service=postgres service_meta.index=13
t=2015-09-01T14:27:21+0000 lvl=info msg="broadcasting leader event" component=discoverd fn=broadcast service=postgres instance.id=939e596395b31bf342cf097db8669cd4 instance.addr=100.100.28.2:5432
t=2015-09-01T14:27:23+0000 lvl=info msg="broadcasting up event" component=discoverd fn=broadcast service=postgres-api instance.id=8a5d3c2213bb15f564c43e4270143c8e instance.addr=100.100.28.3:80
if event.ServiceMeta != nil {
ctx = append(ctx, []interface{}{"service_meta.index", event.ServiceMeta.Index}...)
}
log.Info(fmt.Sprintf("broadcasting %s event", event.Kind), ctx...)

This comment has been minimized.

Copy link
@titanous

titanous Sep 1, 2015

Member

It's probably worth having an event=KIND pair.

discoverd: Log broadcast events
This will make it easier to debug issues around potentially not
receiving service events in the client.

Signed-off-by: Lewis Marshall <lewis@lmars.net>

@lmars lmars force-pushed the discoverd-log-broadcast branch from 1fc20cb to 5a74b1f Sep 1, 2015

@lmars

This comment has been minimized.

Copy link
Member Author

lmars commented Sep 1, 2015

@titanous comments addressed

@titanous

This comment has been minimized.

Copy link
Member

titanous commented Sep 1, 2015

LGTM

lmars added a commit that referenced this pull request Sep 1, 2015

Merge pull request #1801 from flynn/discoverd-log-broadcast
discoverd: Log broadcast events

@lmars lmars merged commit 3d8d704 into master Sep 1, 2015

1 check passed

continuous-integration/flynn The Flynn CI build passed
Details

@lmars lmars deleted the discoverd-log-broadcast branch Sep 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.