Logging Winston Monitored Resource
See original GitHub issueEnvironment 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 camelCaseprojectId
.
// 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Interface Options (5.2.2) | Node.js client library
Serialize winston-provided log metadata using util.inspect . ... The monitored resource that the transport corresponds to.
Read more >Winston Logger Ultimate Tutorial: Best Practices ...
Get an in-depth tutorial on Winston logging. Learn best practices for structuring your Node.js application so you can write easy and clean ...
Read more >Complete Winston Logger Guide With Hands-on Examples
Logging is critical for monitoring and troubleshooting your Node.js project. The open-source Winston logger helps take a load off our ...
Read more >Node.js Logging with Winston
Introducing Node Js Developers to Logging Using Winston Loggers. ... and connectivity issues are all resource-related issues to log.
Read more >A Complete Guide to Winston Logging in Node.js
Want to centralize and monitor your Linux logs? Head over to Logtail and start ingesting your logs in 5 minutes. Getting started with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for verifying. I have opened #2601 to deal with the zone label.
Thanks. I suspect this will be fixed by https://github.com/GoogleCloudPlatform/google-cloud-node/pull/2483. @stephenplusplus could we get a release for the base
logging
module followed by a dep-bump + release oflogging-{winston,bunyan}
?