You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
OS: Docker container for launcher.gcr.io/google/nodejs (Ubuntu 16)
Node.js version: v14.16.0
npm version: 6.14.11
@google-cloud/logging-bunyan version: 3.0.2
bunyan version: 1.8.15
Steps to reproduce
given the following snippet in a file called script.ts:
import { LoggingBunyan } from '@google-cloud/logging-bunyan';
import * as bunyan from 'bunyan';
import * as fs from 'fs';
function getLogger(className: string): bunyan {
return bunyan.createLogger({
name: className,
streams: [
new LoggingBunyan({
projectId: 'PROJECT_ID',
keyFilename: 'PATH_TO_CREDS_JSON',
}).stream('trace'),
],
});
}
const myLog = getLogger('james-local');
myLog.info({ 'test-1': true });
// myLog.info({ 'test-2': fs.readFileSync('temp_file.json', 'utf8') });
myLog.info({ 'test-3': true });
replace PROJECT_ID and PATH_TO_CREDS_JSON with real values so we can talk to stackdriver locally
run the code without an API error occurring and see no issues logging the myLog.info({ 'test-3': true }); e.g. ts-node script.ts
generate a file slightly larger than the 256K limit to force an API error e.g. mkfile -n 260k temp_file.json
uncomment the line that attempts to log the contents of this file myLog.info({ 'test-2': fs.readFileSync('temp_file.json', 'utf8') });
run the code with an API error occurring and see issues logging, the process exits and never hits the myLog.info({ 'test-3': true }); and results in a stack trace like:
/${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/call.ts:81
return Object.assign(new Error(message), status);
^
Error: 3 INVALID_ARGUMENT: Log entry with size 260.3K exceeds maximum size of 256.0K
at Object.callErrorFromStatus (/${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/call.ts:81:24)
at Object.onReceiveStatus (/${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/client.ts:334:36)
at Object.onReceiveStatus (/${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
at Object.onReceiveStatus (/${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
at /${PATH_TO_PKG}/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
at processTicksAndRejections (internal/process/task_queues.js:75:11)
while there are ways to pre-empt this specific API error of exceeding the size limit, would like a way to make sure the stream can resume after this type of event occurs.
Environment details
launcher.gcr.io/google/nodejs(Ubuntu 16)@google-cloud/logging-bunyanversion: 3.0.2bunyanversion: 1.8.15Steps to reproduce
script.ts:PROJECT_IDandPATH_TO_CREDS_JSONwith real values so we can talk to stackdriver locallymyLog.info({ 'test-3': true });e.g.ts-node script.tsmkfile -n 260k temp_file.jsonmyLog.info({ 'test-2': fs.readFileSync('temp_file.json', 'utf8') });myLog.info({ 'test-3': true });and results in a stack trace like:while there are ways to pre-empt this specific API error of exceeding the size limit, would like a way to make sure the stream can resume after this type of event occurs.