process

public abstract void process<C>(MetadataHandler<C> handler, C context)

Processes a combined view of the scope and log-site metadata in this processor by invoking the given handler for each distinct metadata key. The handler method invoked depends on whether the key is single valued or repeated.

Rules for merging scope and log-site metadata are as follows:

  • Distinct keys are iterated in the order they were first declared, with scope keys preceding log-site keys.
  • For singleton keys, a log-site value replaces any value supplied in the scope.
  • For repeated keys, all values are collected in declaration order, with scope values preceding log-site values.

Note that equal or identical repeated values are permitted, and no "deduplication" is performed. This is very much in contrast to the Tags mechanism, which de-duplicates mappings and reorders keys and values to generate a minimal, canonical representation.

Furthermore, scope-supplied tags will be a single value in the scope metadata, keyed with the TAGS key.

Parameters

handler

the metadata handler to be called back

context

arbitrary context instance to be passed into each callback.