My understanding is that the type specified in the pipeline is added to the apm event. However, we had a strict mapping defined for internal metrics, as they are expected to be known upfront, and therefore no unknown metrics should be indexed.
If it is an option for you, I recommend updating to 8.9, as the mapping was changed from strict to runtime, see changelog.
Otherwise you could make use of custom component templates to add the type field to your metrics attribute, OR set up an ES ingest pipeline with a drop processor to remove the field before indexing to ES.