forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Prerelease collector contrib v0.51.0 (open-telemetry#9975)
- Loading branch information
Przemek Delewski
committed
Jun 30, 2022
1 parent
698dea6
commit bc167dd
Showing
15 changed files
with
634 additions
and
47 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Copyright 2021 OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// shttp://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package awss3exporter | ||
|
||
import ( | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"go.opentelemetry.io/collector/component/componenttest" | ||
"go.opentelemetry.io/collector/config" | ||
"go.opentelemetry.io/collector/service/servicetest" | ||
) | ||
|
||
func TestLoadConfig(t *testing.T) { | ||
factories, err := componenttest.NopFactories() | ||
assert.NoError(t, err) | ||
|
||
factory := NewFactory() | ||
factories.Exporters[typeStr] = factory | ||
cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "default.yaml"), factories) | ||
|
||
require.NoError(t, err) | ||
require.NotNil(t, cfg) | ||
|
||
e := cfg.Exporters[config.NewComponentID(typeStr)] | ||
|
||
assert.Equal(t, e, | ||
&Config{ | ||
ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), | ||
|
||
S3Uploader: S3UploaderConfig{ | ||
Region: "us-east-1", | ||
S3Partition: "minute", | ||
}, | ||
MarshalerName: "otlp_json", | ||
}, | ||
) | ||
} | ||
|
||
func TestConfig(t *testing.T) { | ||
factories, err := componenttest.NopFactories() | ||
assert.Nil(t, err) | ||
|
||
factory := NewFactory() | ||
factories.Exporters[factory.Type()] = factory | ||
cfg, err := servicetest.LoadConfigAndValidate( | ||
filepath.Join("testdata", "config.yaml"), factories) | ||
|
||
require.NoError(t, err) | ||
require.NotNil(t, cfg) | ||
|
||
e := cfg.Exporters[config.NewComponentID(typeStr)] | ||
|
||
assert.Equal(t, e, | ||
&Config{ | ||
ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), | ||
|
||
S3Uploader: S3UploaderConfig{ | ||
Region: "us-east-1", | ||
S3Bucket: "foo", | ||
S3Prefix: "bar", | ||
S3Partition: "minute", | ||
}, | ||
MarshalerName: "otlp_json", | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2022 OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package awss3exporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter" | ||
|
||
import "context" | ||
|
||
type DataWriter interface { | ||
WriteBuffer(ctx context.Context, buf []byte, config *Config, metadata string, format string) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/stretchr/testify v1.7.4 | ||
go.opentelemetry.io/collector v0.54.0 | ||
go.opentelemetry.io/collector/pdata v0.54.0 | ||
go.uber.org/zap v1.21.0 | ||
) | ||
|
||
require ( | ||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/knadh/koanf v1.4.2 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
go.opencensus.io v0.23.0 // indirect | ||
go.opentelemetry.io/otel v1.7.0 // indirect | ||
go.opentelemetry.io/otel/metric v0.30.0 // indirect | ||
go.opentelemetry.io/otel/trace v1.7.0 // indirect | ||
go.uber.org/atomic v1.9.0 // indirect | ||
go.uber.org/multierr v1.8.0 // indirect | ||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect | ||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect | ||
google.golang.org/grpc v1.47.0 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.