Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudWatch Logs Fluent Bit Plugin initial implementation #1

Merged
merged 28 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a1c55c3
Added gitignore
PettitWesley Jun 7, 2019
ea98d4a
Project scaffolding
PettitWesley Jun 7, 2019
5cf68e5
Code duplicated from https://github.com/awslabs/amazon-kinesis-fireho…
PettitWesley Jun 7, 2019
bc6857a
Fluent Bit CloudWatch plugin initial implementation
PettitWesley Jun 7, 2019
3525abb
WIP: Adding all other options
PettitWesley Jun 13, 2019
cd25350
Added a test for the case where multiple describes are needed to find…
PettitWesley Jun 16, 2019
f5ee27a
Init logger in FLBPluginInit
PettitWesley Jun 16, 2019
2a41383
bugfix: plugin does not error when trying to create an existing log g…
PettitWesley Jun 16, 2019
6fa0682
fix log statements
PettitWesley Jun 16, 2019
c0fa73a
Log events in a single PutLogEvents request must be in chronological …
PettitWesley Jun 16, 2019
b5c424e
CloudWatch uses milliseconds since epoch for time stamps
PettitWesley Jun 16, 2019
7daeed4
added timeout
PettitWesley Jun 16, 2019
c670974
Debugging timeout
PettitWesley Jun 16, 2019
9024c31
temp changes for plugins (will be removed once firehose PR is merged
PettitWesley Jun 17, 2019
1539acd
Add the ability to configure endpoint
PettitWesley Jun 19, 2019
43db402
Convert recursion to iteration
PettitWesley Jun 19, 2019
3ee46f8
Add cases for DataAlreadyAcceptedException and InvalidSequenceTokenEx…
PettitWesley Jun 19, 2019
e839067
Add test cases for DataAlreadyAcceptedException and InvalidSequenceTo…
PettitWesley Jun 19, 2019
0776d33
Address some of @hencrice comments
PettitWesley Jun 19, 2019
249f6fb
Added periodic clean up for log stream buffers, to prevent long term …
PettitWesley Jun 19, 2019
cb26d5f
Add more debug statements
PettitWesley Jun 19, 2019
f6f5db4
Bugfix: set custom endpoint in all cases
PettitWesley Jun 22, 2019
f65552f
Project rename github.com/awslabs/amazon-cloudwatch-logs-for-fluent-b…
PettitWesley Jun 24, 2019
fb639ed
Import shared plugins library from Kinesis Firehose plugin
PettitWesley Jun 24, 2019
c9af980
Address @hencrice comment
PettitWesley Jun 28, 2019
b64082f
Bugfix: logStreamInactivityCheckInterval is a duration in minutes
PettitWesley Jun 30, 2019
5e5e486
Bugfix: fix logic for finding an existing log stream
PettitWesley Jul 1, 2019
96ac403
bugfix: store log streams based on their name, not the fluent tag
PettitWesley Jul 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# build output dir
bin

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file 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.

ROOT := $(shell pwd)

all: build

SCRIPT_PATH := $(ROOT)/scripts/:${PATH}
SOURCES := $(shell find . -name '*.go')
PLUGIN_BINARY := ./bin/cloudwatch.so

.PHONY: build
build: $(PLUGIN_BINARY)

$(PLUGIN_BINARY): $(SOURCES)
PATH=${PATH} golint ./cloudwatch
mkdir -p ./bin
go build -buildmode c-shared -o $(PLUGIN_BINARY) ./
@echo "Built Amazon CloudWatch Logs Fluent Bit Plugin"

.PHONY: generate
generate: $(SOURCES)
PATH=$(SCRIPT_PATH) go generate ./...
hencrice marked this conversation as resolved.
Show resolved Hide resolved


.PHONY: test
test:
go test -timeout=120s -v -cover ./...
hencrice marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: clean
clean:
rm -rf ./bin/*
Loading