Skip to content

Commit

Permalink
[exporter/datadog]: merge main resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmustin committed Apr 27, 2021
2 parents 54a02c3 + b747cdc commit 784d2b1
Show file tree
Hide file tree
Showing 204 changed files with 905 additions and 642 deletions.
17 changes: 11 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ jobs:
- run:
name: Build collector for all archs
command: grep ^otelcontribcol-all-sys Makefile|fmt -w 1|tail -n +2|circleci tests split|xargs make
- run:
name: Log checksums to console
command: shasum -a 256 bin/*
- persist_to_workspace:
root: ~/
paths: project/bin
Expand All @@ -334,9 +337,10 @@ jobs:
- run:
name: Unit test coverage
command: make unit-tests-with-cover
- run:
name: Upload unit test coverage
command: bash <(curl -s https://codecov.io/bash) -F unit
# DISABLE CODECOV UNTIL THE SCRIPT IS AUDITED AND WE ARE CERTAIN IT IS OK TO TO EXECUTE IT.
# - run:
# name: Upload unit test coverage
# command: bash <(curl -s https://codecov.io/bash) -F unit

loadtest:
executor: golang
Expand Down Expand Up @@ -516,9 +520,10 @@ jobs:
mkdir -p test-results/junit
trap "go-junit-report -set-exit-code < test-results/go-integration-tests.out > test-results/junit/results.xml" EXIT
make integration-tests-with-cover | tee test-results/go-integration-tests.out
- run:
name: Upload integration test coverage
command: bash <(curl -s https://codecov.io/bash) -F integration
# DISABLE CODECOV UNTIL THE SCRIPT IS AUDITED AND WE ARE CERTAIN IT IS OK TO TO EXECUTE IT.
# - run:
# name: Upload integration test coverage
# command: bash <(curl -s https://codecov.io/bash) -F integration
- store_test_results:
path: test-results/junit
- store_artifacts:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ generate:
# Build the Collector executable.
.PHONY: otelcontribcol
otelcontribcol:
GO111MODULE=on CGO_ENABLED=0 go build -o ./bin/otelcontribcol_$(GOOS)_$(GOARCH)$(EXTENSION) \
GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ./bin/otelcontribcol_$(GOOS)_$(GOARCH)$(EXTENSION) \
$(BUILD_INFO) ./cmd/otelcontribcol

# Build the Collector executable, including unstable functionality.
.PHONY: otelcontribcol-unstable
otelcontribcol-unstable:
GO111MODULE=on CGO_ENABLED=0 go build -o ./bin/otelcontribcol_unstable_$(GOOS)_$(GOARCH)$(EXTENSION) \
GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ./bin/otelcontribcol_unstable_$(GOOS)_$(GOARCH)$(EXTENSION) \
$(BUILD_INFO) -tags enable_unstable ./cmd/otelcontribcol

.PHONY: otelcontribcol-all-sys
Expand Down
7 changes: 3 additions & 4 deletions cmd/otelcontribcol/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ func main() {
}

info := component.ApplicationStartInfo{
ExeName: "otelcontribcol",
LongName: "OpenTelemetry Contrib Collector",
Version: version.Version,
GitHash: version.GitHash,
ExeName: "otelcontribcol",
Version: version.Version,
GitHash: version.GitHash,
}

if err := run(service.Parameters{ApplicationStartInfo: info, Factories: factories}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3
go.uber.org/zap v1.16.0
gopkg.in/ini.v1 v1.57.0 // indirect
)
4 changes: 2 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb h1:PlUztTWr2Trqjm7qMLmwmF/mxk1SLmFDRezOJhYoH7A=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3 h1:++3Sh9JOIMrQtUT/91KCRvigAPRoPL1PWqa2dXf58EQ=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
8 changes: 4 additions & 4 deletions exporter/alibabacloudlogserviceexporter/logs_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (

func createSimpleLogData(numberOfLogs int) pdata.Logs {
logs := pdata.NewLogs()
logs.ResourceLogs().Resize(2)
rl := logs.ResourceLogs().At(0)
rl.InstrumentationLibraryLogs().Resize(2)
ill := rl.InstrumentationLibraryLogs().At(0)
logs.ResourceLogs().AppendEmpty() // Add an empty ResourceLogs
rl := logs.ResourceLogs().AppendEmpty()
rl.InstrumentationLibraryLogs().AppendEmpty() // Add an empty InstrumentationLibraryLogs
ill := rl.InstrumentationLibraryLogs().AppendEmpty()

for i := 0; i < numberOfLogs; i++ {
ts := pdata.Timestamp(int64(i) * time.Millisecond.Nanoseconds())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func getComplexAttributeValueMap() pdata.AttributeValue {

func createLogData(numberOfLogs int) pdata.Logs {
logs := pdata.NewLogs()
logs.ResourceLogs().Resize(2)
rl := logs.ResourceLogs().At(0)
logs.ResourceLogs().AppendEmpty() // Add an empty ResourceLogs
rl := logs.ResourceLogs().AppendEmpty()
rl.Resource().Attributes().InsertString("resouceKey", "resourceValue")
rl.Resource().Attributes().InsertString(conventions.AttributeServiceName, "test-log-service-exporter")
rl.Resource().Attributes().InsertString(conventions.AttributeHostName, "test-host")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@ func TestMetricDataToLogService(t *testing.T) {
logger := zap.NewNop()

md := pdata.NewMetrics()
md.ResourceMetrics().Resize(2)
rm := md.ResourceMetrics().At(0)
md.ResourceMetrics().AppendEmpty() // Add an empty ResourceMetrics
rm := md.ResourceMetrics().AppendEmpty()

rm.Resource().Attributes().InsertString("labelB", "valueB")
rm.Resource().Attributes().InsertString("labelA", "valueA")
rm.Resource().Attributes().InsertString("a", "b")
ilms := rm.InstrumentationLibraryMetrics()
ilms.Resize(2)
ilm := ilms.At(0)
ilms.AppendEmpty() // Add an empty InstrumentationLibraryMetrics
ilm := ilms.AppendEmpty()

metrics := ilm.Metrics()
metrics.Resize(10)

badNameMetric := metrics.At(0)
badNameMetric := metrics.AppendEmpty()
badNameMetric.SetName("")

noneMetric := metrics.At(1)
noneMetric := metrics.AppendEmpty()
noneMetric.SetName("none")

intGaugeMetric := metrics.At(2)
intGaugeMetric := metrics.AppendEmpty()
intGaugeMetric.SetDataType(pdata.MetricDataTypeIntGauge)
intGaugeMetric.SetName("int_gauge")
intGauge := intGaugeMetric.IntGauge()
Expand All @@ -57,7 +56,7 @@ func TestMetricDataToLogService(t *testing.T) {
intGaugeDataPoint.SetValue(10)
intGaugeDataPoint.SetTimestamp(pdata.Timestamp(100_000_000))

doubleGaugeMetric := metrics.At(3)
doubleGaugeMetric := metrics.AppendEmpty()
doubleGaugeMetric.SetDataType(pdata.MetricDataTypeDoubleGauge)
doubleGaugeMetric.SetName("double_gauge")
doubleGauge := doubleGaugeMetric.DoubleGauge()
Expand All @@ -67,7 +66,7 @@ func TestMetricDataToLogService(t *testing.T) {
doubleGaugeDataPoint.SetValue(10.1)
doubleGaugeDataPoint.SetTimestamp(pdata.Timestamp(100_000_000))

intSumMetric := metrics.At(4)
intSumMetric := metrics.AppendEmpty()
intSumMetric.SetDataType(pdata.MetricDataTypeIntSum)
intSumMetric.SetName("int_sum")
intSum := intSumMetric.IntSum()
Expand All @@ -77,7 +76,7 @@ func TestMetricDataToLogService(t *testing.T) {
intSumDataPoint.SetValue(11)
intSumDataPoint.SetTimestamp(pdata.Timestamp(100_000_000))

doubleSumMetric := metrics.At(5)
doubleSumMetric := metrics.AppendEmpty()
doubleSumMetric.SetDataType(pdata.MetricDataTypeDoubleSum)
doubleSumMetric.SetName("double_sum")
doubleSum := doubleSumMetric.DoubleSum()
Expand All @@ -87,7 +86,7 @@ func TestMetricDataToLogService(t *testing.T) {
doubleSumDataPoint.SetValue(10.1)
doubleSumDataPoint.SetTimestamp(pdata.Timestamp(100_000_000))

intHistogramMetric := metrics.At(6)
intHistogramMetric := metrics.AppendEmpty()
intHistogramMetric.SetDataType(pdata.MetricDataTypeIntHistogram)
intHistogramMetric.SetName("double_histogram")
intHistogram := intHistogramMetric.IntHistogram()
Expand All @@ -100,7 +99,7 @@ func TestMetricDataToLogService(t *testing.T) {
intHistogramDataPoint.SetBucketCounts([]uint64{1, 2, 3})
intHistogramDataPoint.SetExplicitBounds([]float64{1, 2})

doubleHistogramMetric := metrics.At(7)
doubleHistogramMetric := metrics.AppendEmpty()
doubleHistogramMetric.SetDataType(pdata.MetricDataTypeHistogram)
doubleHistogramMetric.SetName("double_$histogram")
doubleHistogram := doubleHistogramMetric.Histogram()
Expand All @@ -113,7 +112,7 @@ func TestMetricDataToLogService(t *testing.T) {
doubleHistogramDataPoint.SetBucketCounts([]uint64{1, 2, 3})
doubleHistogramDataPoint.SetExplicitBounds([]float64{1, 2})

doubleSummaryMetric := metrics.At(8)
doubleSummaryMetric := metrics.AppendEmpty()
doubleSummaryMetric.SetDataType(pdata.MetricDataTypeSummary)
doubleSummaryMetric.SetName("double-summary")
doubleSummary := doubleSummaryMetric.Summary()
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemf
go 1.15

require (
github.com/aws/aws-sdk-go v1.38.21
github.com/aws/aws-sdk-go v1.38.26
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.2.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/metrics v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3
go.uber.org/zap v1.16.0
google.golang.org/protobuf v1.26.0
)
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsemfexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
github.com/aws/aws-sdk-go v1.37.8/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.38.21 h1:D08DXWI4QRaawLaW+OtsIEClOI90I6eheJs1GwXTQVI=
github.com/aws/aws-sdk-go v1.38.21/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.38.26 h1:xHABHMEb/00NydXFy/2Lo+7yIgxGxN/6Fvll3l1Nwnc=
github.com/aws/aws-sdk-go v1.38.26/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down Expand Up @@ -1028,8 +1028,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb h1:PlUztTWr2Trqjm7qMLmwmF/mxk1SLmFDRezOJhYoH7A=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3 h1:++3Sh9JOIMrQtUT/91KCRvigAPRoPL1PWqa2dXf58EQ=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng=
go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg=
go.opentelemetry.io/otel/metric v0.19.0/go.mod h1:8f9fglJPRnXuskQmKpnad31lcLJ2VmNNqIsx/uIwBSc=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/signalfx/opencensus-go-exporter-kinesis v0.6.3
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3
go.uber.org/zap v1.16.0
gopkg.in/ini.v1 v1.57.0 // indirect
)
4 changes: 2 additions & 2 deletions exporter/awskinesisexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb h1:PlUztTWr2Trqjm7qMLmwmF/mxk1SLmFDRezOJhYoH7A=
go.opentelemetry.io/collector v0.25.1-0.20210421230708-d10b842f49eb/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3 h1:++3Sh9JOIMrQtUT/91KCRvigAPRoPL1PWqa2dXf58EQ=
go.opentelemetry.io/collector v0.25.1-0.20210424160629-2e33101196e3/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
1 change: 1 addition & 0 deletions exporter/awsprometheusremotewriteexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exporters:
endpoint: "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-XXX/api/v1/remote_write"
aws_auth:
region: "us-east-1" # need to match workspace region
service: "aps"
role_arn: "arn:aws:iam::123456789012:role/aws-service-role/access"
ca_file: "/var/lib/mycert.pem"
write_buffer_size: 524288
Expand Down
Loading

0 comments on commit 784d2b1

Please sign in to comment.