- 
                Notifications
    You must be signed in to change notification settings 
- Fork 218
Closed
Labels
api: functionstracked internallyIssues that are tracked internally, even though the issue is closedIssues that are tracked internally, even though the issue is closedtype: bug
Description
This is using the new require('firebase-functions').logger in Node 10.
According to the container logs contract we should be able to write labels for a LogEntry by using the special field logging.googleapis.com/labels. However these labels just get applied to the jsonPayload in the Logs Viewer (in GCP).
I've also tried just a plan labels field with no success.
Reproduction
Deploy a function that contains the following and run the function:
const { logger } = require('firebase-functions')
logger.write({
    severity: 'INFO',
    message: 'Should include labels (via labels)',
    labels: {
      label1: 'some value'
    }
})
logger.write({
    severity: 'INFO',
    message: 'Should include labels (via logging.googleapis.com/labels)',
    'logging.googleapis.com/labels': {
      label1: 'some value'
    }
})I'd expect the jsonPayload[labels] and jsonPayload[logging.googleapis.com/labels] to be included under the labels at the root.
It might be the case its not supported but wanted to check as other special fields from the list (i.e. message, timestamp) are being converted correctly!
voxmaster and glumb
Metadata
Metadata
Assignees
Labels
api: functionstracked internallyIssues that are tracked internally, even though the issue is closedIssues that are tracked internally, even though the issue is closedtype: bug
