UNPKG

@codebayu/usesignoz

Version:

The reusable plugin to implement signoz on Nuxt project

12 lines (11 loc) 416 B
export const mappingAttributes = (span, attributes) => { for (const key in attributes) { if (attributes.hasOwnProperty(key)) { const value = attributes[key]; span.setAttribute(key, value); } } }; export const customAttributesToResourceFetchSpan = (span, resource) => { span.setAttribute('resource.tcp.duration_ms', resource.connectEnd - resource.connectStart); };