nodejs-logging-bunyan icon indicating copy to clipboard operation
nodejs-logging-bunyan copied to clipboard

Allow defining labels in LoggingBunyan options

Open galaxyfeeder opened this issue 3 years ago • 0 comments

For us would be very useful to be able to set labels for a LoggingBunyan instance.

Is your feature request related to a problem? Please describe. Filtering logs in the same GCP project with custom requirements.

Describe the solution you'd like Being able to pass to the options of LoggingBunyan the labels for the instance that will be merged with the log labels and sent with each LogEntry, and only pass that information to GCP, like the serviceContext or the resource.

Describe alternatives you've considered

  1. Sending resource.labels, however you can only send predefined labels and not custom labels.
  2. Sending on each log message the labels as they get checked and passed if all of them are key-value strings, however that would mean that a) are sent to all other streams and not only to GCP and b) that we need to modify all our code to include a new label.

Additional context Nope :)

galaxyfeeder avatar Mar 24 '22 12:03 galaxyfeeder