Skip to content

Commit 43ee922

Browse files
authored
Merge pull request open-telemetry#76 from amazon-contributing/aws-cwa-dev-apm
Merging the aws-cwa-dev branch
2 parents ad98170 + fe71641 commit 43ee922

File tree

133 files changed

+2431
-1636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2431
-1636
lines changed

.github/workflows/build-and-test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
- name: Setup Go
140140
uses: actions/setup-go@v4
141141
with:
142-
go-version: ~1.19.9
142+
go-version: ~1.19.11
143143
- name: Cache Go
144144
id: go-cache
145145
uses: actions/cache@v3
@@ -213,6 +213,7 @@ jobs:
213213
git diff --exit-code '.github/ISSUE_TEMPLATE' || (echo 'Dropdowns in issue templates are out of date, please run "make generate-gh-issue-templates" and commit the changes in this PR.' && exit 1)
214214
unittest-matrix:
215215
strategy:
216+
fail-fast: false
216217
matrix:
217218
go-version: ["1.20", 1.19] # 1.20 is interpreted as 1.2 without quotes
218219
group:

cmd/configschema/go.mod

+8-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ require (
8383
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.77.0 // indirect
8484
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.77.0 // indirect
8585
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.77.0 // indirect
86-
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.79.0 // indirect
86+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.77.0 // indirect
8787
github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.77.0 // indirect
8888
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.77.0 // indirect
8989
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.77.0 // indirect
@@ -277,7 +277,7 @@ require (
277277
github.com/alecthomas/participle/v2 v2.0.0 // indirect
278278
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
279279
github.com/aliyun/aliyun-log-go-sdk v0.1.44 // indirect
280-
github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20230630150539-890f186a40da // indirect
280+
github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20230727225902-317222bcea83 // indirect
281281
github.com/andybalholm/brotli v1.0.5 // indirect
282282
github.com/antonmedv/expr v1.12.5 // indirect
283283
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
@@ -286,11 +286,11 @@ require (
286286
github.com/apache/thrift v0.18.1 // indirect
287287
github.com/ardielle/ardielle-go v1.5.2 // indirect
288288
github.com/armon/go-metrics v0.4.1 // indirect
289-
github.com/aws/aws-sdk-go v1.44.293 // indirect
289+
github.com/aws/aws-sdk-go v1.44.309 // indirect
290290
github.com/aws/aws-sdk-go-v2 v1.18.0 // indirect
291291
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
292-
github.com/aws/aws-sdk-go-v2/config v1.18.25 // indirect
293-
github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect
292+
github.com/aws/aws-sdk-go-v2/config v1.18.22 // indirect
293+
github.com/aws/aws-sdk-go-v2/credentials v1.13.21 // indirect
294294
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
295295
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 // indirect
296296
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect
@@ -303,9 +303,9 @@ require (
303303
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17 // indirect
304304
github.com/aws/aws-sdk-go-v2/service/kinesis v1.17.11 // indirect
305305
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 // indirect
306-
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect
307-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect
308-
github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 // indirect
306+
github.com/aws/aws-sdk-go-v2/service/sso v1.12.9 // indirect
307+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9 // indirect
308+
github.com/aws/aws-sdk-go-v2/service/sts v1.18.10 // indirect
309309
github.com/aws/smithy-go v1.13.5 // indirect
310310
github.com/beorn7/perks v1.0.1 // indirect
311311
github.com/blang/semver v3.5.1+incompatible // indirect

cmd/configschema/go.sum

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/otelcontribcol/exporters_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"runtime"
2626
"testing"
2727

28+
override "github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws"
2829
"github.com/stretchr/testify/assert"
2930
"github.com/stretchr/testify/require"
3031
"go.opentelemetry.io/collector/component"
@@ -496,6 +497,7 @@ func TestDefaultExporters(t *testing.T) {
496497
expectedExporters[k] = struct{}{}
497498
}
498499
for _, tt := range tests {
500+
override.IMDSRetryer = nil
499501
_, ok := expFactories[tt.exporter]
500502
if !ok {
501503
// not part of the distro, skipping.

cmd/otelcontribcol/go.mod

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontrib
55
go 1.19
66

77
require (
8+
github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20230727225902-317222bcea83
89
github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.77.0
910
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.77.0
1011
github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.77.0
@@ -269,7 +270,6 @@ require (
269270
github.com/alecthomas/participle/v2 v2.0.0 // indirect
270271
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
271272
github.com/aliyun/aliyun-log-go-sdk v0.1.44 // indirect
272-
github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-20230630150539-890f186a40da // indirect
273273
github.com/andybalholm/brotli v1.0.5 // indirect
274274
github.com/antonmedv/expr v1.12.5 // indirect
275275
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
@@ -278,11 +278,11 @@ require (
278278
github.com/apache/thrift v0.18.1 // indirect
279279
github.com/ardielle/ardielle-go v1.5.2 // indirect
280280
github.com/armon/go-metrics v0.4.1 // indirect
281-
github.com/aws/aws-sdk-go v1.44.293 // indirect
281+
github.com/aws/aws-sdk-go v1.44.309 // indirect
282282
github.com/aws/aws-sdk-go-v2 v1.18.0 // indirect
283283
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
284-
github.com/aws/aws-sdk-go-v2/config v1.18.25 // indirect
285-
github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect
284+
github.com/aws/aws-sdk-go-v2/config v1.18.22 // indirect
285+
github.com/aws/aws-sdk-go-v2/credentials v1.13.21 // indirect
286286
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
287287
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 // indirect
288288
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect
@@ -295,9 +295,9 @@ require (
295295
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17 // indirect
296296
github.com/aws/aws-sdk-go-v2/service/kinesis v1.17.11 // indirect
297297
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 // indirect
298-
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect
299-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect
300-
github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 // indirect
298+
github.com/aws/aws-sdk-go-v2/service/sso v1.12.9 // indirect
299+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9 // indirect
300+
github.com/aws/aws-sdk-go-v2/service/sts v1.18.10 // indirect
301301
github.com/aws/smithy-go v1.13.5 // indirect
302302
github.com/beorn7/perks v1.0.1 // indirect
303303
github.com/blang/semver v3.5.1+incompatible // indirect
@@ -497,7 +497,7 @@ require (
497497
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.77.0 // indirect
498498
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.77.0 // indirect
499499
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.77.0 // indirect
500-
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.79.0 // indirect
500+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.77.0 // indirect
501501
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.77.0 // indirect
502502
github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.77.0 // indirect
503503
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.77.0 // indirect

cmd/otelcontribcol/go.sum

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/oteltestbedcol/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ require (
6565
github.com/antonmedv/expr v1.12.5 // indirect
6666
github.com/apache/thrift v0.18.1 // indirect
6767
github.com/armon/go-metrics v0.4.1 // indirect
68-
github.com/aws/aws-sdk-go v1.44.255 // indirect
68+
github.com/aws/aws-sdk-go v1.44.309 // indirect
6969
github.com/beorn7/perks v1.0.1 // indirect
7070
github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect
7171
github.com/cenkalti/backoff/v4 v4.2.1 // indirect

cmd/oteltestbedcol/go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/awscloudwatchlogsexporter/config.go

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ type Config struct {
5757
// Export raw log string instead of log wrapper
5858
// Required for emf logs
5959
RawLog bool `mapstructure:"raw_log,omitempty"`
60+
61+
// Only allow emf logs
62+
// If this is true raw log must also be true
63+
EmfOnly bool `mapstructure:"emf_only,omitempty"`
6064
}
6165

6266
type QueueSettings struct {
@@ -80,6 +84,9 @@ func (config *Config) Validate() error {
8084
if !isValidRetentionValue(config.LogRetention) {
8185
return errors.New("invalid value for retention policy. Please make sure to use the following values: 0 (Never Expire), 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, or 3653")
8286
}
87+
if config.EmfOnly && !config.RawLog {
88+
return errors.New("emf only is true, but raw log is false")
89+
}
8390
return nil
8491
}
8592

0 commit comments

Comments
 (0)