A Generative Approach to Define Rich Domain-Specific Trace Metamodels