I am currently using Google Stackdriver (the new layout!) to investigate my logging. In my case there are three services communicating between each other. I'd love to see their communication between each other in the form of my INFO logging in the most convenient way possible.
FooService > BarService > SnickerService
Currently I am only able to see the log of one of either services. So I started to open three browser tabs and having all three mentioned service logs opened. Now I figure out a timestamp/range where the FooService
started calling BarService
.
This timerange I apply to the other remaining two services.
That way I have a overview how the process is being distributed among those services.
This way to do it however is super awkward to setup every time
This leads me to the question if I can bring the logging of three containers into one Stackdriver view?
In the log query I see this field (example FooService)
resource.labels.pod_name="fooservice-bd4c9bf4d-nv4k2"
AND
operation here?View Logs
in the Google Cloud Console. So this can't be much of a fast way imho.You can use 2 operators
With : you can search on partial name. Use this resource.labels.pod_name: "fooservice"
matches all the fooservice pod name.
With () you can group values or comparison, like this ("foo" OR "bar")
If you put all together
resource.labels.pod_name: ("fooservice" OR "barservice")
-> This filter allows you to filter on the pod_name which contains the values "fooservice" OR "barservice"