Hi, not sure if this is an issue with this lib or with the nodejs-logging lib, so I'll start here.
"httpRequest": {
"requestUrl": "/healthcheck",
"requestMethod": "GET",
"userAgent": "GoogleHC/1.0",
"responseSize": 2,
"status": 200,
"latency": {
"seconds": 0,
"nanos": 1000000
}
},
If the latency-property on the request log is missing the stackdriver-logging-agent ingests it ok.
Hi, not sure if this is an issue with this lib or with the nodejs-logging lib, so I'll start here.
When running the library with
redirectToStdout: truein a container on GCE the httpRequest serializes the trace-property as an object:Example:
The stackdriver-logging-agent errors out (error message as reported here: GoogleCloudPlatform/fluent-plugin-google-cloud#433) on the httpRequest, since it expects the latency to be a string: https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/blob/master/lib/fluent/plugin/out_google_cloud.rb#L1612.
Reference: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#httprequest (according to this the JSON-representation of the latency is a string, not an object).
If the latency-property on the request log is missing the stackdriver-logging-agent ingests it ok.
Environment details
and gem 'fluent-plugin-google-cloud' version '0.12.7')
@google-cloud/logging-bunyanversion: 4.2.2Steps to reproduce