1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon
Doug Davis 26b1064967 Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-24 11:56:37 -07:00
..
events Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
execdriver Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
graphdriver Try to resize data and metadata loopback file when initiating devicemapper 2015-09-24 09:31:00 +08:00
links Cleanup links top level pkg 2015-07-29 23:39:18 +02:00
logger daemon: logger: error out on daemon start if invalid logger address 2015-09-20 16:20:25 +02:00
network Docker changes for libnetwork Sandbox 2015-09-02 17:24:56 -07:00
archive.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
archive_unix.go Windows: Factoring out unused fields 2015-07-27 17:44:18 -07:00
archive_windows.go Windows: Factoring out unused fields 2015-07-27 17:44:18 -07:00
attach.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
changes.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
commit.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
config.go Add support for DNS options 2015-09-16 14:06:45 -07:00
config_experimental.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
config_stub.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
config_unix.go Revert "Make daemon to start with no userlandproxy by default" 2015-09-16 09:56:38 -07:00
config_windows.go Change all docker -d to docker daemon 2015-08-10 20:48:08 +08:00
container.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
container_unit_test.go Add STOPSIGNAL instruction to dockerfiles. 2015-09-10 19:56:05 -04:00
container_unix.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
container_windows.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
create.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
create_unix.go Move api/errors/ to errors/ 2015-09-17 11:54:14 -07:00
create_windows.go Move VolumeDriver to HostConfig to make containers portable. 2015-09-04 12:42:44 -04:00
daemon.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
daemon_aufs.go Move graph.SetupInitLayer to daemon package where it is used 2015-06-16 16:50:56 -07:00
daemon_btrfs.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_devicemapper.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_linux.go Improvements to the original sharing implementation. 2015-09-23 12:07:24 -04:00
daemon_linux_test.go Improvements to the original sharing implementation. 2015-09-23 12:07:24 -04:00
daemon_no_aufs.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
daemon_overlay.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
daemon_test.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
daemon_unix.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
daemon_unix_test.go Cleanup: Merge adjustCPUShares to adoptContainerSettings 2015-08-06 08:15:14 +08:00
daemon_unsupported.go Add platformSupported flag to enable daemon mode by platform. 2015-08-07 09:45:24 -07:00
daemon_windows.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
daemon_zfs.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
debugtrap_unix.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
debugtrap_unsupported.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
debugtrap_windows.go Windows: Win32 event for sigusr1 linux equivalence 2015-07-06 18:58:53 -07:00
delete.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
exec.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
exec_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
exec_linux.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
exec_windows.go Windows: Split ContainerExecCreate 2015-05-06 16:19:27 -07:00
export.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
history.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
image_delete.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
info.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
inspect.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
inspect_unix.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
inspect_windows.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
kill.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
list.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
logdrivers_linux.go Add awslogs driver for Amazon CloudWatch Logs 2015-09-09 13:52:40 -07:00
logdrivers_windows.go Add awslogs driver for Amazon CloudWatch Logs 2015-09-09 13:52:40 -07:00
logs.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
monitor.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
pause.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
README.md Docs: remove networkdriver from README.md in daemon 2015-08-22 10:09:07 +08:00
rename.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
resize.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
restart.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
start.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
state.go Move api/errors/ to errors/ 2015-09-17 11:54:14 -07:00
state_test.go golint fixes for daemon/ package 2015-08-27 22:07:42 -07:00
stats.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
stats_collector_unix.go Move api/errors/ to errors/ 2015-09-17 11:54:14 -07:00
stats_collector_windows.go Windows: Factor out stat collector 2015-06-01 09:11:03 -07:00
stats_freebsd.go Refactor the statistics of network in docker stats 2015-09-15 15:40:34 +08:00
stats_linux.go Refactor the statistics of network in docker stats 2015-09-15 15:40:34 +08:00
stats_windows.go Refactor the statistics of network in docker stats 2015-09-15 15:40:34 +08:00
stop.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
top_unix.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
top_windows.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
unpause.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
utils_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
utils_linux.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
utils_nounix.go Windows: Tidy up daemon\utils*.go 2015-07-09 18:47:32 -07:00
utils_test.go Windows: Tidy up daemon\utils*.go 2015-07-09 18:47:32 -07:00
volumes.go Move volume ref counting store to a package. 2015-09-21 12:46:49 -04:00
volumes_linux_unit_test.go Move volume ref counting store to a package. 2015-09-21 12:46:49 -04:00
volumes_unit_test.go Merge pull request #15846 from ZJU-SEL/11646-fix-path-validations 2015-09-03 20:42:37 -04:00
volumes_unix.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
volumes_windows.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00
wait.go Add context.RequestID to event stream 2015-09-24 11:56:37 -07:00

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver

Code pertaining to storing images:

  • graphdriver