diff --git a/batchconsumer/consumer.go b/batchconsumer/consumer.go index 9b16e0b..c51ddd1 100644 --- a/batchconsumer/consumer.go +++ b/batchconsumer/consumer.go @@ -13,9 +13,6 @@ import ( // Config used for BatchConsumer constructor. Any empty fields are populated with defaults. type Config struct { - // DeployEnv the name of the deployment environment - DeployEnv string - // LogFile where consumer errors and failed log lines are saved LogFile string @@ -56,10 +53,6 @@ func withDefaults(config Config) Config { config.BatchSize = 4 * 1024 * 1024 } - if config.DeployEnv == "" { - config.DeployEnv = "unknown-env" - } - // Not totally clear we need this rate limit. The KCL may do rate limiting for us. if config.ReadRateLimit == 0 { config.ReadRateLimit = 1000 diff --git a/batchconsumer/writer.go b/batchconsumer/writer.go index af102d1..c8341d2 100644 --- a/batchconsumer/writer.go +++ b/batchconsumer/writer.go @@ -65,7 +65,7 @@ func (b *batchedWriter) splitMessageIfNecessary(record []byte) ([][]byte, error) } // Process a batch of messages from a CWLogs Subscription - return splitter.GetMessagesFromGzippedInput(record, b.config.DeployEnv == "production") + return splitter.GetMessagesFromGzippedInput(record) } func (b *batchedWriter) ProcessRecords(records []kcl.Record) error { diff --git a/cmd/batchconsumer/main.go b/cmd/batchconsumer/main.go index f97e574..f12d3c1 100644 --- a/cmd/batchconsumer/main.go +++ b/cmd/batchconsumer/main.go @@ -29,7 +29,6 @@ func main() { BatchCount: 500, BatchSize: 4 * 1024 * 1024, // 4Mb LogFile: "/tmp/example-kcl-consumer", - DeployEnv: "test-env", } output, file := createDummyOutput()