@datadog/webpack-plugin 0.0.11-dev → 0.0.13-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5599,16 +5599,17 @@ const getMetrics = (opts, report, bundler) => {
5599
5599
  if (bundler.esbuild) {
5600
5600
  metrics.push(...getEsbuildMetrics(bundler.esbuild, opts.cwd));
5601
5601
  }
5602
+ const ddOptions = getOptionsDD(opts);
5602
5603
  const metricsToSend = metrics.map((m) => {
5603
5604
  let metric = m;
5604
- if (opts[CONFIG_KEY].datadog?.filters?.length) {
5605
- for (const filter of opts[CONFIG_KEY].datadog.filters) {
5605
+ if (ddOptions.filters?.length) {
5606
+ for (const filter of ddOptions.filters) {
5606
5607
  if (metric) {
5607
5608
  metric = filter(metric);
5608
5609
  }
5609
5610
  }
5610
5611
  }
5611
- return metric ? getMetric(metric, getOptionsDD(opts)) : null;
5612
+ return metric ? getMetric(metric, ddOptions) : null;
5612
5613
  }).filter((m) => m !== null);
5613
5614
  return metricsToSend;
5614
5615
  };