-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
api: loggingIssues related to the googleapis/nodejs-logging-winston API.Issues related to the googleapis/nodejs-logging-winston API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
I wanted to add operation details to my logs as described in https://cloud.google.com/logging/docs/structured-logging#structured_logging_special_fields.
When writing logs like
logger.info("logmessage...", {"logging.googleapis.com/operation": { id: "doStuff", producer: requestId }})
I expected the log entries to have an "operation" field in the Log Explorer UI, although they just appeared in messages.jsonPayload.metadata as a string.
Similar to how traceIds are handled in common.ts, I would want to implement the same handling for operation
s, as passing traceIds works like this as intended:
logger.info("logmessage...", {"logging.googleapis.com/trace": "projects/projectid/..."})
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/nodejs-logging-winston API.Issues related to the googleapis/nodejs-logging-winston API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.