hipages/php-fpm_exporter

View on GitHub

Showing 3 of 3 total issues

Function NewExporter has 94 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func NewExporter(pm PoolManager) *Exporter {
    return &Exporter{
        PoolManager: pm,

        CountProcessState: false,
Severity: Major
Found in phpfpm/exporter.go - About 2 hrs to fix

    Method Exporter.Collect has 53 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
        e.mutex.Lock()
        defer e.mutex.Unlock()
    
        if err := e.PoolManager.Update(); err != nil {
    Severity: Minor
    Found in phpfpm/exporter.go - About 1 hr to fix

      Method Pool.Update has 6 return statements (exceeds 4 allowed).
      Open

      func (p *Pool) Update() (err error) {
          p.ScrapeError = nil
      
          scheme, address, path, err := parseURL(p.Address)
          if err != nil {
      Severity: Major
      Found in phpfpm/phpfpm.go - About 40 mins to fix
        Severity
        Category
        Status
        Source
        Language