@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.
package/dist/src/index.js CHANGED
@@ -5623,16 +5623,17 @@ const getMetrics = (opts, report, bundler) => {
5623
5623
  if (bundler.esbuild) {
5624
5624
  metrics.push(...getEsbuildMetrics(bundler.esbuild, opts.cwd));
5625
5625
  }
5626
+ const ddOptions = getOptionsDD(opts);
5626
5627
  const metricsToSend = metrics.map((m) => {
5627
5628
  let metric = m;
5628
- if (opts[CONFIG_KEY].datadog?.filters?.length) {
5629
- for (const filter of opts[CONFIG_KEY].datadog.filters) {
5629
+ if (ddOptions.filters?.length) {
5630
+ for (const filter of ddOptions.filters) {
5630
5631
  if (metric) {
5631
5632
  metric = filter(metric);
5632
5633
  }
5633
5634
  }
5634
5635
  }
5635
- return metric ? getMetric(metric, getOptionsDD(opts)) : null;
5636
+ return metric ? getMetric(metric, ddOptions) : null;
5636
5637
  }).filter((m) => m !== null);
5637
5638
  return metricsToSend;
5638
5639
  };