-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging 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: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Error report:
one of our static analysis tools found a bug in PR #7083
The error message is
do not call encoding/json.Marshal on composite types containing protobuf message types
The explanation is go/goprotoapi-findings#message-goreflect-json
The line in question is
google-cloud-go/logging/logging.go
Line 980 in 69eedab
data, err := json.Marshal(Alias(s))
It might be a false positive but you should probably take a look.
It appears that we need to write custom MarshalJSON functions for the proto types that make up structuredLogEntry
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging 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: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.