func (mc *metricCatalog) AddLoadedMetricType(lp *loadedPlugin, mt core.Metric) { if lp.ConfigPolicy == nil { panic("NO") } newMt := metricType{ Plugin: lp, namespace: mt.Namespace(), version: mt.Version(), lastAdvertisedTime: mt.LastAdvertisedTime(), tags: mt.Tags(), labels: mt.Labels(), policy: lp.ConfigPolicy.Get(mt.Namespace()), } mc.Add(&newMt) }