@google-cloud/logging
Advanced tools
Comparing version 10.1.10 to 10.1.11
@@ -26,2 +26,4 @@ "use strict"; | ||
global.instrumentationAdded = false; | ||
// The global variable to avoid records inspection once instrumentation already written to prevent perf impact | ||
global.shouldSkipInstrumentationCheck = false; | ||
// The variable to hold cached library version | ||
@@ -42,2 +44,7 @@ let libraryVersion; | ||
var _a, _b; | ||
// Check if instrumentation data was already written once. This prevents also inspection of | ||
// the entries for instrumentation data to prevent perf degradation | ||
if (global.shouldSkipInstrumentationCheck) { | ||
return [arrify(entry), false]; | ||
} | ||
// Update the flag indicating that instrumentation entry was already added once, | ||
@@ -60,3 +67,6 @@ // so any subsequent calls to this method will not add a separate instrumentation log entry | ||
// and that current library info was added to existing log entry | ||
isInfoAdded = isWritten = true; | ||
global.shouldSkipInstrumentationCheck = | ||
isInfoAdded = | ||
isWritten = | ||
true; | ||
} | ||
@@ -71,3 +81,3 @@ entries.push(entryItem); | ||
entries.push(createDiagnosticEntry(undefined, undefined)); | ||
isInfoAdded = true; | ||
global.shouldSkipInstrumentationCheck = isInfoAdded = true; | ||
} | ||
@@ -74,0 +84,0 @@ return [entries, isInfoAdded]; |
{ | ||
"name": "@google-cloud/logging", | ||
"version": "10.1.10", | ||
"version": "10.1.11", | ||
"description": "Cloud Logging Client Library for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4211165
71029