Remove Datadog metrics
This commit is contained in:
parent
20e1895e6b
commit
e3c0aaa5ef
@ -45,7 +45,6 @@ type Config struct {
|
||||
|
||||
LogOutputFile string `yaml:"log-output"`
|
||||
MetricsAddr string `yaml:"metrics-addr"`
|
||||
DatadogAddr string `yaml:"datadog-addr"`
|
||||
OtlpEnabled bool `yaml:"otlp-enabled"` // Whether to configure OpenTelemetry Metrics
|
||||
HealthAddr string `yaml:"health-addr"`
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ func main() {
|
||||
go healthServer.Serve(lis)
|
||||
|
||||
// Start the metrics server.
|
||||
exportMetrics(ctx, config.DatadogAddr, config.OtlpEnabled)
|
||||
exportMetrics(ctx, config.OtlpEnabled)
|
||||
go metricsServer(config.MetricsAddr)
|
||||
|
||||
// Start the inserter thread.
|
||||
|
||||
@ -12,7 +12,6 @@ import (
|
||||
"net/http/pprof"
|
||||
|
||||
metrics "github.com/hashicorp/go-metrics"
|
||||
"github.com/hashicorp/go-metrics/datadog"
|
||||
"github.com/hashicorp/go-metrics/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
ktmetrics "github.com/signalapp/keytransparency/cmd/kt-server/metrics"
|
||||
@ -42,7 +41,7 @@ func endpointLabel(endpoint string) metrics.Label {
|
||||
return metrics.Label{Name: "endpoint", Value: endpoint}
|
||||
}
|
||||
|
||||
func exportMetrics(ctx context.Context, addr string, otlpEnabled bool) {
|
||||
func exportMetrics(ctx context.Context, otlpEnabled bool) {
|
||||
prom, err := prometheus.NewPrometheusSink()
|
||||
if err != nil {
|
||||
util.Log().Fatalf("building prometheus sink: %v", err)
|
||||
@ -50,15 +49,6 @@ func exportMetrics(ctx context.Context, addr string, otlpEnabled bool) {
|
||||
sink := metrics.FanoutSink{prom}
|
||||
defer sink.Shutdown()
|
||||
|
||||
if addr != "" {
|
||||
util.Log().Infof("Initiating datadog metrics at %q", addr)
|
||||
ddog, err := datadog.NewDogStatsdSink(addr, "")
|
||||
if err != nil {
|
||||
util.Log().Fatalf("error initializing statsd client: %v", err)
|
||||
}
|
||||
sink = append(sink, ddog)
|
||||
}
|
||||
|
||||
if otlpEnabled {
|
||||
util.Log().Infof("Initiating otlp metrics")
|
||||
otlpSink, err := ktmetrics.NewOTLPSink(ctx)
|
||||
|
||||
2
go.mod
2
go.mod
@ -32,8 +32,6 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@ -3,10 +3,6 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q=
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
|
||||
Loading…
Reference in New Issue
Block a user