Environment details
- OS: Ubuntu 16.04
- Node.js version: v4.8.4
- npm version: 2.15.11
- google-cloud/logging-winston: 0.5.0
Hi there. 2 things that I noticed when trying out the Stackdriver transport for winston.
- The auto detection of monitored resource is not accurate. My node app is running on Google Compute Engine (GCE), but my logs appear in Google Container Engine (GKE). I am using PM2 to manage my node applications, could this be the cause?
- Since the auto detection above wasn't working accurately, I tried specifying the monitored resource manually. The keys for
labels seems to only take snake_case i.e. project_id and NOT camelCase projectId.
// Works
resource: {
type: 'gce_instance',
labels: {
project_id: projectId,
instance_id: instanceId,
zone: zone,
},
},
// Does not work. Nothing gets logged
resource: {
type: 'gce_instance',
labels: {
projectId: projectId,
instanceId: instanceId,
zone: zone,
},
},
I referred to the documentations here and here when specifying the key-value.
Environment details
Hi there. 2 things that I noticed when trying out the Stackdriver transport for winston.
labelsseems to only take snake_case i.e.project_idand NOT camelCaseprojectId.I referred to the documentations here and here when specifying the key-value.