code: func (p *Plugin) Metrics() ([]producers.MetricsMessage, error) {
  	var messages []producers.MetricsMessage
  
  	// Fetch node metrics
  	nodeMetrics, err := p.getNodeMetrics()
  	if err != nil {
  		return nil, err
  	}
  	messages = append(messages, nodeMetrics)
  
  	// Master only collects node metrics; return without checking containers
  	if p.Role == dcos.RoleMaster {
  		return messages, nil
  	}
  
  	// Fetch container metrics
  	containerMetrics, err := p.getContainerMetrics()
  	if err != nil {
  		return nil, err
  	}
  	messages = append(messages, containerMetrics...)
  	return messages, nil
  }
docs: // Metrics queries the local dcos-metrics API and returns a slice of
  // producers.MetricsMessage.