process method

Future<RawEvent?> process(
  1. RawEvent event
)

Implementation

Future<RawEvent?> process(RawEvent event) async {
  if (!_isEnabled(event)) {
    return null;
  }

  final beforeResult = await timeline.applyPlugins(PluginType.before, event);
  if (beforeResult == null) {
    return null;
  }

  final enrichmentResult =
      await timeline.applyPlugins(PluginType.enrichment, event);
  if (enrichmentResult == null) {
    return null;
  }

  await super.execute(enrichmentResult);

  final afterResult = await timeline.applyPlugins(PluginType.after, event);
  return afterResult;
}