func New(options ...OptionsFunc) (*Exporter, error) {
	e := &Exporter{
		addr: ":9090",
	}
	for _, f := range options {
		if err := f(e); err != nil {
			return nil, errors.Wrap(err, "failed to set options")
		}
	}
	if e.logger == nil {
		l, err := NewLogger()
		if err != nil {
			return nil, errors.Wrap(err, "failed to create logger")
		}
		e.logger = l
	}
	if e.endpoint == nil && e.fcgiEndpoint == nil {
		u, _ := url.Parse("http://localhost:9000/status")
		e.endpoint = u
	}
	return e, nil
}
New creates an exporter.
package exporter
import (
	"context"
	"net"
	"net/http"
	"net/url"
	"os"
	"os/signal"
	"syscall"
	"time"
	"github.com/pkg/errors"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"go.uber.org/zap"
	"golang.org/x/sync/errgroup"
)
type Exporter struct {
	addr            string
	endpoint        *url.URL
	fcgiEndpoint    *url.URL
	logger          *zap.Logger
	metricsEndpoint string
}
type OptionsFunc func(*Exporter) error