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.
Use the field labels within the record object log.info({labels: -1}, 'test')
it will crash with
TypeError: .google.logging.v2.LogEntry.labels: object expected
at Type.LogEntry$fromObject [as fromObject] (eval at Codegen (/usr/src/app/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:86:9)
at Type.WriteLogEntriesRequest$fromObject [as fromObject] (eval at Codegen (/usr/src/app/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:30:25)
at serialize (/usr/src/app/node_modules/grpc/src/protobuf_js_6_common.js:71:23)
at Object.final_requester.sendMessage (/usr/src/app/node_modules/grpc/src/client_interceptors.js:806:37)
at InterceptingCall._callNext (/usr/src/app/node_modules/grpc/src/client_interceptors.js:419:43)
at InterceptingCall.sendMessage (/usr/src/app/node_modules/grpc/src/client_interceptors.js:464:8)
at InterceptingCall._callNext (/usr/src/app/node_modules/grpc/src/client_interceptors.js:428:12)
at InterceptingCall.sendMessage (/usr/src/app/node_modules/grpc/src/client_interceptors.js:464:8)
at ServiceClient.Client.makeUnaryRequest (/usr/src/app/node_modules/grpc/src/client.js:536:21)
at ServiceClient.method_func (/usr/src/app/node_modules/grpc/src/client.js:950:43)
at /usr/src/app/node_modules/@google-cloud/logging/build/src/v2/logging_service_v2_client.js:188:39
at Task.timeoutFunc [as _apiCall] (/usr/src/app/node_modules/google-gax/build/src/api_callable.js:143:16)
at Task.run (/usr/src/app/node_modules/google-gax/build/src/bundling.js:195:18)
at BundleExecutor._runNow (/usr/src/app/node_modules/google-gax/build/src/bundling.js:421:14)
at Timeout._timers.(anonymous function).setTimeout [as _onTimeout] (/usr/src/app/node_modules/google-gax/build/src/bundling.js:367:22)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
it looks like the protobuf for LogEntry defines the labels field as Object.<string, string>
seems like this is a reserved field so the easiest fix here would probably be to update documentation to avoid using this field (and potentially others?)
Environment details
@google-cloud/logging-bunyanversion: 0.9.5Steps to reproduce
log.info({labels: -1}, 'test')it will crash with
it looks like the protobuf for LogEntry defines the labels field as
Object.<string, string>seems like this is a reserved field so the easiest fix here would probably be to update documentation to avoid using this field (and potentially others?)
Thanks!