// this this stage writes a single metrics to the database.
.withFunction(new SimpleMetricWriter(new ThreadPoolBuilder().withName("Database Writer").build()))
// this stage updates the context, which eventually gets push to the database.
.withFunction(new ContextUpdater(new ThreadPoolBuilder().withName("Context Updater").build(), context))
.build();
return processor;
}