-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logger breaks on nested objects #1302
Comments
I'll look right into this, thanks for reporting! |
The raised error is:
|
PR sent: #1303 Please try it out! $ npm install --save stephenplusplus/gcloud-node#spp--1302 |
It works this way! |
@stephenplusplus didn't this one make it to 0.33.0 on npm? facing the same issue here in my docker container |
It did. Can you paste the code to reproduce and the error? |
Yes one sec, ps logging breaks with entries containing boolean fields as well throwing the error: /src/node_modules/gcloud/node_modules/grpc/node_modules/protobufjs/dist/ProtoBuf.js:2440
throw Error(this+"#"+keyOrObj+" is not a field: undefined");
^
Error: .google.protobuf.Value#booleanValue is not a field: undefined |
bigquery.createDataset(datasetName, function(err, dataset) {
if (err && err.code !== 409)
throw err;
logger.createSink(loggerName, {
destination: bigquery.dataset(datasetName)
}, function(err, sink){
if (err && err.code !== 409)
throw err;
console.log('logger service started.');
log = logger.log('syslogs');
nc.subscribe('events.logger.error', function(data){
_syslog(data);
})
});
function _syslog(data)
{
var entry = log.entry({}, data);
log.write(entry, (err, apiResponse) =>{
console.log(err, apiResponse);
});
} The data I'm writing looks like this: { error: 'Unprocessable Entity',
message: 'Please check your phone number and try again.',
code: 422,
retry: false,
whoami:
{ image: 'service-sms',
port: 5000,
online: true,
host: '46.101.140.203',
name: 'sms',
region: 'local',
version: '0.0.1',
dockerhost: '172.17.0.5',
publichost: '46.101.140.203',
ports: [ 5000 ] },
severity: 'INFO',
origin: 'server',
method: 'send',
request: { to: 'xx', text: 'hello world' } } |
Yup, one sec please |
It's throwing this error:
(It's also screaming about |
grr sorry my bad sec please |
Ok that seemed to have fixed this error! the callback returns error 400 though, I'm not sure why that is |
I receive that as well without providing something like the following as the first argument to the entry: var entry = log.entry({
type: 'gce_instance',
labels: {
zone: 'global',
instance_id: '3'
}
}, ... |
yeah that's what I tried to replace, basically I passed my "whoami" object as the resource hence the error I just reported, I will try to place a dummy resource pr your example |
the resource object structure seems to be strict and must contain those specific attributes, I tried to add additional labels that didn't work either; but OK that works for me as I'm storing the "whoami" as a part of the entry |
Cool, thanks for catching this. It's out now under 0.34.0. |
Awesome! Thank you! Looking at the source of datastore/query.js I see you made some minor modifications there (added info to the cb and got rid of autoPaginate), is this out in 0.34.0 as well? |
Yes, that's included as well. Here are the release notes: https://github.com/GoogleCloudPlatform/gcloud-node/releases/tag/v0.34.0 |
Source-Link: googleapis/synthtool@b801276 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ba3f2990fefe465f89834e4c46f847ddb141afa54daa6a1d462928fa679ed143 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/nodejs-tasks/compare/v2.4.2...v2.5.0) (2021-12-09) ### Features * add eslintignore for sameple generated code ([#1302](https://www.github.com/googleapis/nodejs-tasks/issues/1302)) ([#582](https://www.github.com/googleapis/nodejs-tasks/issues/582)) ([bf99e4e](https://www.github.com/googleapis/nodejs-tasks/commit/bf99e4ecc1c46cfd84893ef0ab097d27f26f9139)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Source-Link: googleapis/synthtool@b801276 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ba3f2990fefe465f89834e4c46f847ddb141afa54daa6a1d462928fa679ed143 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [2.6.0](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.5.0...v2.6.0) (2021-12-09) ### Features * add eslintignore for sameple generated code ([#1302](https://www.github.com/googleapis/nodejs-cloud-container/issues/1302)) ([#497](https://www.github.com/googleapis/nodejs-cloud-container/issues/497)) ([cea38ea](https://www.github.com/googleapis/nodejs-cloud-container/commit/cea38ea9c7b515d133853492ce48de22c843c985)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Source-Link: googleapis/synthtool@b801276 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ba3f2990fefe465f89834e4c46f847ddb141afa54daa6a1d462928fa679ed143 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@b801276 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ba3f2990fefe465f89834e4c46f847ddb141afa54daa6a1d462928fa679ed143 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: nicain <nicain.seattle@gmail.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [3.2.0](https://www.github.com/googleapis/nodejs-document-ai/compare/v3.1.0...v3.2.0) (2021-12-14) ### Features * add eslintignore for sameple generated code ([#1302](https://www.github.com/googleapis/nodejs-document-ai/issues/1302)) ([#286](https://www.github.com/googleapis/nodejs-document-ai/issues/286)) ([2baf637](https://www.github.com/googleapis/nodejs-document-ai/commit/2baf63798501748096b8e17500789e067ec66edd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Hi,
I'm facing a real strange problem:
after updating to 0.32.0 the logging service breaks when a nested object is passed.
es:
Thanks in advance
The text was updated successfully, but these errors were encountered: