Effect CommunityEC
Effect Community9mo ago
4 replies
Igor Gassmann

Filtering Out Default `effect_fiber_*` Metrics in Effect Before Exporting

Hey there! Is there an easy way to filter out Effect’s default effect_fiber_* metrics before export? I'm not using them, so I just want to avoid sending unnecessary data to my OTel backend.

I've tried using an OTel view, but it doesn't work:

const dropEffectFiberMetricsView: ViewOptions = {
  instrumentName: 'effect_fiber_*',
  aggregation: {
    type: AggregationType.DROP,
  },
}

const OtelLive = OtelNodeSdk.layer(() => ({
  resource,
  views: [dropEffectFiberMetricsView],
  metricReader: new PeriodicExportingMetricReader({
    exporter: metricExporter,
    exportIntervalMillis: 1000,
  })
}))


I believe this may not work because Effect might be recording the effect_fiber_* metrics before the OTel SDK is initialized.
Was this page helpful?