@instana/core
Version:
Core library for Instana's Node.js packages
22 lines (18 loc) • 438 B
JavaScript
/*
* (c) Copyright IBM Corp. 2026
*/
;
/**
* Fast interceptor to identify log frames on the hot path
* @param {import('../../core').InstanaBaseSpan} span
* @returns {boolean}
*/
function isLogSpan(span) {
if (!span) return false;
if (span.data && span.data.log) return true;
if (span.n && typeof span.n === 'string' && span.n.startsWith('log.')) return true;
return false;
}
module.exports = {
isLogSpan
};