Skip to content

Commit

Permalink
Merge branch 'main' into integrate-nginxreceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
nslaughter authored May 3, 2022
2 parents c02d56c + b32af03 commit 2243223
Show file tree
Hide file tree
Showing 174 changed files with 1,452 additions and 830 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### 🛑 Breaking changes 🛑

- `datadogexporter`: Replace HistogramMode defined as string with enum.

### 🚩 Deprecations 🚩

- `exporter/azuremonitor`: Deprecate use of LogRecord.Name as the log envelope category name. There is no replacement.
Expand All @@ -24,6 +26,7 @@
- `azuremonitorexporter`: Fix log exporter bug related to incorrectly mapping SpanId (#9579)
- `mysqlreceiver`: Fix attribute values mismatch with its definition (#9688)
- `opencensusreceiver`: Do not report fatal error if err is server closed (#9559).
- `sqlserverreceiver`: Fix the receiver to have integer types on metrics where applicable (#9601)
- `nginxreceiver`: Include nginxreceiver in components (#9572)

## v0.50.0
Expand Down
14 changes: 7 additions & 7 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
require (
bitbucket.org/atlassian/go-asap/v2 v2.6.0 // indirect
cloud.google.com/go v0.100.2 // indirect
cloud.google.com/go/compute v1.6.0 // indirect
cloud.google.com/go/compute v1.6.1 // indirect
cloud.google.com/go/monitoring v1.4.0 // indirect
cloud.google.com/go/spanner v1.31.0 // indirect
cloud.google.com/go/trace v1.2.0 // indirect
Expand Down Expand Up @@ -53,12 +53,12 @@ require (
github.com/Showmax/go-fqdn v1.0.0 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/aliyun/aliyun-log-go-sdk v0.1.31 // indirect
github.com/aliyun/aliyun-log-go-sdk v0.1.33 // indirect
github.com/antonmedv/expr v1.9.0 // indirect
github.com/apache/thrift v0.16.0 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/aws/aws-sdk-go v1.44.5 // indirect
github.com/aws/aws-sdk-go v1.43.45 // indirect
github.com/aws/aws-sdk-go-v2 v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect
Expand Down Expand Up @@ -188,7 +188,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/compress v1.15.2 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect
github.com/leoluk/perflib_exporter v0.1.0 // indirect
Expand Down Expand Up @@ -469,10 +469,10 @@ require (
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/api v0.77.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect
google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3 // indirect
google.golang.org/grpc v1.46.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.37.1 // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.38.1 // indirect
gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
Expand All @@ -487,7 +487,7 @@ require (
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.40.1 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/kubelet v0.23.5 // indirect
k8s.io/kubelet v0.23.6 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
Expand Down
61 changes: 17 additions & 44 deletions cmd/configschema/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibab
go 1.17

require (
github.com/aliyun/aliyun-log-go-sdk v0.1.31
github.com/aliyun/aliyun-log-go-sdk v0.1.33
github.com/gogo/protobuf v1.3.2
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.50.0
github.com/stretchr/testify v1.7.1
Expand Down
4 changes: 2 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsclo
go 1.17

require (
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/google/uuid v1.3.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.0.0-00010101000000-000000000000
Expand Down
4 changes: 2 additions & 2 deletions exporter/awscloudwatchlogsexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemf
go 1.17

require (
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskin
go 1.17

require (
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.50.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.50.0
github.com/stretchr/testify v1.7.1
Expand Down
4 changes: 2 additions & 2 deletions exporter/awskinesisexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/awsprometheusremotewriteexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awspro
go 1.17

require (
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.50.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.50.1-0.20220429151328-041f39835df7
Expand All @@ -22,7 +22,7 @@ require (
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/compress v1.15.2 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsprometheusremotewriteexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxra
go 1.17

require (
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.7.1
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsxrayexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/coralogixexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/jaegertracing/jaeger v1.33.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/compress v1.15.2 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions exporter/coralogixexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 26 additions & 16 deletions exporter/datadogexporter/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ var (
errNoMetadata = errors.New("only_metadata can't be enabled when host_metadata::enabled = false or host_metadata::hostname_source != first_resource")
)

// TODO: Import these from translator when we eliminate cyclic dependency.
const (
histogramModeNoBuckets = "nobuckets"
histogramModeCounters = "counters"
histogramModeDistributions = "distributions"
)

const (
// DefaultSite is the default site of the Datadog intake to send data to
DefaultSite = "datadoghq.com"
Expand Down Expand Up @@ -93,6 +86,30 @@ type MetricsConfig struct {
SummaryConfig SummaryConfig `mapstructure:"summaries"`
}

type HistogramMode string

const (
// HistogramModeNoBuckets reports no bucket histogram metrics. .sum and .count metrics will still be sent
// if `send_count_sum_metrics` is enabled.
HistogramModeNoBuckets HistogramMode = "nobuckets"
// HistogramModeCounters reports histograms as Datadog counts, one metric per bucket.
HistogramModeCounters HistogramMode = "counters"
// HistogramModeDistributions reports histograms as Datadog distributions (recommended).
HistogramModeDistributions HistogramMode = "distributions"
)

var _ encoding.TextUnmarshaler = (*HistogramMode)(nil)

func (hm *HistogramMode) UnmarshalText(in []byte) error {
switch mode := HistogramMode(in); mode {
case HistogramModeCounters, HistogramModeDistributions, HistogramModeNoBuckets:
*hm = mode
return nil
default:
return fmt.Errorf("invalid histogram mode %q", mode)
}
}

// HistogramConfig customizes export of OTLP Histograms.
type HistogramConfig struct {
// Mode for exporting histograms. Valid values are 'distributions', 'counters' or 'nobuckets'.
Expand All @@ -102,15 +119,15 @@ type HistogramConfig struct {
// if `send_count_sum_metrics` is enabled.
//
// The current default is 'distributions'.
Mode string `mapstructure:"mode"`
Mode HistogramMode `mapstructure:"mode"`

// SendCountSum states if the export should send .sum and .count metrics for histograms.
// The current default is false.
SendCountSum bool `mapstructure:"send_count_sum_metrics"`
}

func (c *HistogramConfig) validate() error {
if c.Mode == histogramModeNoBuckets && !c.SendCountSum {
if c.Mode == HistogramModeNoBuckets && !c.SendCountSum {
return fmt.Errorf("'nobuckets' mode and `send_count_sum_metrics` set to false will send no histogram metrics")
}
return nil
Expand Down Expand Up @@ -498,13 +515,6 @@ func (c *Config) Unmarshal(configMap *config.Map) error {
}
c.warnings = append(c.warnings, renamingWarnings...)

switch c.Metrics.HistConfig.Mode {
case histogramModeCounters, histogramModeNoBuckets, histogramModeDistributions:
// Do nothing
default:
return fmt.Errorf("invalid `mode` %s", c.Metrics.HistConfig.Mode)
}

// Add warnings about autodetected environment variables.
c.warnings = append(c.warnings, warnUseOfEnvVars(configMap, c)...)

Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/DataDog/agent-payload/v5 v5.0.20
github.com/DataDog/datadog-agent/pkg/quantile v0.35.0
github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02
github.com/aws/aws-sdk-go v1.44.5
github.com/aws/aws-sdk-go v1.43.45
github.com/cenkalti/backoff/v4 v4.1.3
github.com/gogo/protobuf v1.3.2
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.50.0
Expand All @@ -18,7 +18,7 @@ require (
go.opentelemetry.io/collector/semconv v0.50.1-0.20220429151328-041f39835df7
go.uber.org/multierr v1.8.0
go.uber.org/zap v1.21.0
gopkg.in/DataDog/dd-trace-go.v1 v1.37.1
gopkg.in/DataDog/dd-trace-go.v1 v1.38.1
gopkg.in/zorkian/go-datadog-api.v2 v2.30.0
)

Expand Down
Loading

0 comments on commit 2243223

Please sign in to comment.