--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/0a739b87-4481-4f3f-84a2-3eaec71f9a1e%40googlegroups.com.
+Ruxanda Danetiu and +Marie Cosgrove-Davies might have some ideas on Istio integrations for Stackdriver...
On Tue, Jul 30, 2019 at 2:56 PM Jamie Talbot <ja...@pinian.co> wrote:
Hey folks,--TL;DR - I want istio to emit a log for inbound requests to the istio-ingressgaeway with a specific MonitoredResource type and an HTTPRequest object attached to the labels, to enable correlated logging of a request through all the services that have a hand in serving it. Is that possible?--I have a web application consisting of 4 microservices on GKE with the istio add-on, and fronted by an Istio Ingressgateway. I would like to be able to easily see all the logs that are generated from each of these services as part of an incoming request from a client. For example, if they hit the URL `/users/jamie`. I've had some success with the parent and child structured log format to correlate logs, as described here: https://cloud.google.com/appengine/articles/logging?source=post_page---------------------------#linking_app_logs_and_requests. However, there are two entries into the application. Requests to /graphql go to graphql-service, all other requests go to web-service. This means I have to log the HTTPRequest object in both services, and have multiple loggers for each. To complicate things further, web-service sometimes calls graphql-service directly for server side rendering. In those cases, the "start" of the request is the HTTPRequest to web-service.It occurs to me that the istio-ingress is the actual best place to log the overall HTTPRequest. At the moment, as far as I can see, the Stackdriver Monitoring add-on logs requests in the k8s_container.cluster-name.default log, where it dumps in a lot of request information. In order to make my idea work, I'd want it to instead generate a "project" MonitoredResource log to match the other services, with an attached HTTPRequest object. I believe then that each microservice could just write to their own log, which means i could look at them on a service-level, but that they would also be grouped under the top-level istio-generated request log.How feasible is this? I've had a look at handlers.stackdriver, and I believe from istio documentation that there's a monitoredResourceType and monitoredResourceDimension field I could add to the log entry, but I've got no idea how to attach an httprequest object, and I'm kind of fumbling blindly with changes to that YAML. I also don't know if changes would stay applied over upgrades/reloads etc.Cheers,Jamie.
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.
Hey folks, wondered if anyone had any thoughts about this :)Best,
Jamie.
On Tuesday, July 30, 2019 at 12:01:05 PM UTC-7, Mary Koes wrote:
+Ruxanda Danetiu and +Marie Cosgrove-Davies might have some ideas on Istio integrations for Stackdriver...
On Tue, Jul 30, 2019 at 2:56 PM Jamie Talbot <ja...@pinian.co> wrote:
Hey folks,--TL;DR - I want istio to emit a log for inbound requests to the istio-ingressgaeway with a specific MonitoredResource type and an HTTPRequest object attached to the labels, to enable correlated logging of a request through all the services that have a hand in serving it. Is that possible?--I have a web application consisting of 4 microservices on GKE with the istio add-on, and fronted by an Istio Ingressgateway. I would like to be able to easily see all the logs that are generated from each of these services as part of an incoming request from a client. For example, if they hit the URL `/users/jamie`. I've had some success with the parent and child structured log format to correlate logs, as described here: https://cloud.google.com/appengine/articles/logging?source=post_page---------------------------#linking_app_logs_and_requests. However, there are two entries into the application. Requests to /graphql go to graphql-service, all other requests go to web-service. This means I have to log the HTTPRequest object in both services, and have multiple loggers for each. To complicate things further, web-service sometimes calls graphql-service directly for server side rendering. In those cases, the "start" of the request is the HTTPRequest to web-service.It occurs to me that the istio-ingress is the actual best place to log the overall HTTPRequest. At the moment, as far as I can see, the Stackdriver Monitoring add-on logs requests in the k8s_container.cluster-name.default log, where it dumps in a lot of request information. In order to make my idea work, I'd want it to instead generate a "project" MonitoredResource log to match the other services, with an attached HTTPRequest object. I believe then that each microservice could just write to their own log, which means i could look at them on a service-level, but that they would also be grouped under the top-level istio-generated request log.How feasible is this? I've had a look at handlers.stackdriver, and I believe from istio documentation that there's a monitoredResourceType and monitoredResourceDimension field I could add to the log entry, but I've got no idea how to attach an httprequest object, and I'm kind of fumbling blindly with changes to that YAML. I also don't know if changes would stay applied over upgrades/reloads etc.Cheers,Jamie.
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/0a739b87-4481-4f3f-84a2-3eaec71f9a1e%40googlegroups.com.
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/51154205-c9e9-47df-a59e-a5d20fe5435a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/CAJnOKH0d-L4HM4eR%3D2AJ4%3D_rSdGqy%2Bc%2B1C2Q%2B5ktW8y8_xHWUg%40mail.gmail.com.