GeezerVison is showing github.com — Where are the allowed log entry protobuf types documented? · Issue #1577 · googleapis/google-cloud-python
Where are the allowed log entry protobuf types documented? #1577DescriptionThe LogEntry API docs say:
The log entry payload, represented as a protocol buffer. You can only use protoPayload values that belong to a set of approved types.
An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.
Where are the allowed protobuf types documented, and the corresponding URIs? Activitytseaver commented on Mar 7, 2016 ContributorAuthor More actions The discovery docs don't provide any more information about the allowed types. dhermes commented on Mar 8, 2016 tseaver commented on Mar 8, 2016 ContributorAuthor More actions Absent any way to type-check the inputs, I'm thinking we just punt on allowing users to create entries with protoPayload set: we will still parse those created via other services (#1578). dhermes commented on Mar 9, 2016 Yeah punt until we hear from real users. @jgeewax WDYT? jgeewax commented on Mar 25, 2016 That's one option.
Another is that we can do zero client-side checking, send the protobuf as it is. If it's an invalid type it'll get rejected, right ? That might be the better way to go as different versions of the API might allow new types... tseaver commented on Mar 25, 2016 ContributorAuthor More actions OK, I guess we just use google.protobuf.json_format.MessageToJson to render whatever message is passed, and then re-parse it using json.loads.
I will also add a helper which parses/merges the JSON protoPayload into a user-supplied protobuf messge object using google.protobuf.json_format.Parse, after dumping the value via json.dumps. tseaver commented on Mar 25, 2016 ContributorAuthor More actions I wish google.protobuf.json_format._AnyMessageToJsonObject wasn't private -- it looks like exactly what I need. jgeewax commented on Mar 25, 2016 tseaver commented on Mar 29, 2016 ContributorAuthor More actions
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|