Skip to content

Commit

Permalink
BREAKING CHANGE: Rename kinesis exporter to awskinesis (#2234)
Browse files Browse the repository at this point in the history
* BREAKING CHANGE: Rename kinesis exporter to awskinesis

Addresses #2164

* Fix lint
  • Loading branch information
flands authored Feb 2, 2021
1 parent a74d15a commit 9677f5b
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exporter/elasticexporter/ @open-telemetry/collector-contrib-app
exporter/f5cloudexporter/ @open-telemetry/collector-contrib-approvers @gramidt
exporter/honeycombexporter/ @open-telemetry/collector-contrib-approvers @paulosman @lizthegrey @MikeGoldsmith
exporter/jaegerthrifthttpexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @pavolloffay
exporter/kinesisexporter/ @open-telemetry/collector-contrib-approvers @owais
exporter/awskinesisexporter/ @open-telemetry/collector-contrib-approvers @owais
exporter/loadbalancingexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling
exporter/logzioexporter/ @open-telemetry/collector-contrib-approvers @yyyogev
exporter/lokiexporter/ @open-telemetry/collector-contrib-approvers @gramidt
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ updates:
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/exporter/kinesisexporter"
directory: "/exporter/awskinesisexporter"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
Expand Down
6 changes: 3 additions & 3 deletions cmd/otelcontribcol/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsprometheusremotewriteexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter"
Expand All @@ -31,7 +32,6 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerthrifthttpexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kinesisexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter"
Expand Down Expand Up @@ -128,8 +128,9 @@ func components() (component.Factories, error) {

exporters := []component.ExporterFactory{
alibabacloudlogserviceexporter.NewFactory(),
awsprometheusremotewriteexporter.NewFactory(),
awsemfexporter.NewFactory(),
awskinesisexporter.NewFactory(),
awsprometheusremotewriteexporter.NewFactory(),
awsxrayexporter.NewFactory(),
azuremonitorexporter.NewFactory(),
carbonexporter.NewFactory(),
Expand All @@ -139,7 +140,6 @@ func components() (component.Factories, error) {
f5cloudexporter.NewFactory(),
honeycombexporter.NewFactory(),
jaegerthrifthttpexporter.NewFactory(),
kinesisexporter.NewFactory(),
loadbalancingexporter.NewFactory(),
logzioexporter.NewFactory(),
newrelicexporter.NewFactory(),
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package kinesisexporter
package awskinesisexporter

import (
"go.opentelemetry.io/collector/config/configmodels"
)

// AWSConfig contains AWS specific configuration such as kinesis stream, region, etc.
// AWSConfig contains AWS specific configuration such as awskinesis stream, region, etc.
type AWSConfig struct {
StreamName string `mapstructure:"stream_name"`
KinesisEndpoint string `mapstructure:"kinesis_endpoint"`
KinesisEndpoint string `mapstructure:"awskinesis_endpoint"`
Region string `mapstructure:"region"`
Role string `mapstructure:"role"`
}

// KPLConfig contains kinesis producer library related config to controls things
// KPLConfig contains awskinesis producer library related config to controls things
// like aggregation, batching, connections, retries, etc.
type KPLConfig struct {
AggregateBatchCount int `mapstructure:"aggregate_batch_count"`
Expand All @@ -40,7 +40,7 @@ type KPLConfig struct {
MaxBackoffSeconds int `mapstructure:"max_backoff_seconds"`
}

// Config contains the main configuration options for the kinesis exporter
// Config contains the main configuration options for the awskinesis exporter
type Config struct {
configmodels.ExporterSettings `mapstructure:",squash"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package kinesisexporter
package awskinesisexporter

import (
"path"
Expand All @@ -38,13 +38,13 @@ func TestDefaultConfig(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, cfg)

e := cfg.Exporters["kinesis"]
e := cfg.Exporters["awskinesis"]

assert.Equal(t, e,
&Config{
ExporterSettings: configmodels.ExporterSettings{
TypeVal: "kinesis",
NameVal: "kinesis",
TypeVal: "awskinesis",
NameVal: "awskinesis",
},
AWS: AWSConfig{
Region: "us-west-2",
Expand Down Expand Up @@ -79,17 +79,17 @@ func TestConfig(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, cfg)

e := cfg.Exporters["kinesis"]
e := cfg.Exporters["awskinesis"]

assert.Equal(t, e,
&Config{
ExporterSettings: configmodels.ExporterSettings{
TypeVal: "kinesis",
NameVal: "kinesis",
TypeVal: "awskinesis",
NameVal: "awskinesis",
},
AWS: AWSConfig{
StreamName: "test-stream",
KinesisEndpoint: "kinesis.mars-1.aws.galactic",
KinesisEndpoint: "awskinesis.mars-1.aws.galactic",
Region: "mars-1",
Role: "arn:test-role",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package kinesisexporter
package awskinesisexporter

import (
"context"

kinesis "github.com/signalfx/opencensus-go-exporter-kinesis"
awskinesis "github.com/signalfx/opencensus-go-exporter-kinesis"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/consumer/pdata"
Expand All @@ -27,8 +27,8 @@ import (

// Exporter implements an OpenTelemetry trace exporter that exports all spans to AWS Kinesis
type Exporter struct {
kinesis *kinesis.Exporter
logger *zap.Logger
awskinesis *awskinesis.Exporter
logger *zap.Logger
}

var _ component.TracesExporter = (*Exporter)(nil)
Expand All @@ -43,7 +43,7 @@ func (e Exporter) Start(_ context.Context, _ component.Host) error {

// Shutdown is invoked during exporter shutdown.
func (e Exporter) Shutdown(context.Context) error {
e.kinesis.Flush()
e.awskinesis.Flush()
return nil
}

Expand All @@ -61,9 +61,9 @@ func (e Exporter) ConsumeTraces(_ context.Context, td pdata.Traces) error {
if span.Process == nil {
span.Process = pBatch.Process
}
err := e.kinesis.ExportSpan(span)
err := e.awskinesis.ExportSpan(span)
if err != nil {
e.logger.Error("error exporting span to kinesis", zap.Error(err))
e.logger.Error("error exporting span to awskinesis", zap.Error(err))
exportErr = err
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package kinesisexporter
package awskinesisexporter

import (
"context"

kinesis "github.com/signalfx/opencensus-go-exporter-kinesis"
awskinesis "github.com/signalfx/opencensus-go-exporter-kinesis"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configmodels"
"go.opentelemetry.io/collector/exporter/exporterhelper"
)

const (
// The value of "type" key in configuration.
typeStr = "kinesis"
typeStr = "awskinesis"
exportFormat = "jaeger-proto"
)

Expand Down Expand Up @@ -68,7 +68,7 @@ func createTraceExporter(
config configmodels.Exporter,
) (component.TracesExporter, error) {
c := config.(*Config)
k, err := kinesis.NewExporter(&kinesis.Options{
k, err := awskinesis.NewExporter(&awskinesis.Options{
Name: c.Name(),
StreamName: c.AWS.StreamName,
AWSRegion: c.AWS.Region,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kinesisexporter
module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter

go 1.14

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ receivers:
examplereceiver:

exporters:
kinesis:
awskinesis:
queue_size: 1
num_workers: 2
flush_interval_seconds: 3
Expand All @@ -13,7 +13,7 @@ exporters:
stream_name: test-stream
region: mars-1
role: arn:test-role
kinesis_endpoint: kinesis.mars-1.aws.galactic
awskinesis_endpoint: awskinesis.mars-1.aws.galactic

kpl:
aggregate_batch_count: 10
Expand All @@ -34,4 +34,4 @@ service:
traces:
receivers: [examplereceiver]
processors: [exampleprocessor]
exporters: [kinesis]
exporters: [awskinesis]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ receivers:
examplereceiver:

exporters:
kinesis:
awskinesis:

processors:
exampleprocessor:
Expand All @@ -12,4 +12,4 @@ service:
traces:
receivers: [examplereceiver]
processors: [exampleprocessor]
exporters: [kinesis]
exporters: [awskinesis]
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerthrifthttpexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kinesisexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter v0.0.0-00010101000000-000000000000
Expand Down Expand Up @@ -99,7 +99,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadb

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter => ./exporter/newrelicexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kinesisexporter => ./exporter/kinesisexporter
replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter => ./exporter/awskinesisexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter => ./exporter/logzioexporter

Expand Down

0 comments on commit 9677f5b

Please sign in to comment.