private reportResources()

in src/performance/index.ts [99:116]


  private reportResources() {
    const newResources = getResourceEntry().filter((d: PerformanceResourceTiming) => !InitiatorTypes.includes(d.initiatorType))
      .map((d: PerformanceResourceTiming) => ({
        service: this.options.service,
        serviceVersion: this.options.serviceVersion,
        pagePath: this.options.pagePath,
        name: d.name,
        duration: Math.floor(d.duration),
        size: d.transferSize, 
        protocol: d.nextHopProtocol,
        resourceType: d.initiatorType,
      }));
    const list = [...newResources, ...this.resources];
    if (!list.length) {
      return;
    }
    new Report('RESOURCES', this.options.collector).sendByBeacon(list);
  }