Skip to content

Commit

Permalink
Renamed package to stanza (#100)
Browse files Browse the repository at this point in the history
* Renamed package to stanza
  • Loading branch information
djaglowski authored Aug 24, 2020
1 parent 6a468fc commit 445b939
Show file tree
Hide file tree
Showing 129 changed files with 815 additions and 471 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
at: ./artifacts
- run:
name: Download Plugins Tarball
command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/carbon-plugins.tar.gz -o ./artifacts/carbon-plugins.tar.gz
command: curl -fL https://github.com/observiq/stanza-plugins/releases/latest/download/stanza-plugins.tar.gz -o ./artifacts/stanza-plugins.tar.gz
- run:
name: Download Plugins Zip
command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/carbon-plugins.zip -o ./artifacts/carbon-plugins.zip
command: curl -fL https://github.com/observiq/stanza-plugins/releases/latest/download/stanza-plugins.zip -o ./artifacts/stanza-plugins.zip
- run:
name: Download Version File
command: curl -fL https://github.com/observiq/carbon-plugins/releases/latest/download/version.json -o ./artifacts/version.json
command: curl -fL https://github.com/observiq/stanza-plugins/releases/latest/download/version.json -o ./artifacts/version.json
- persist_to_workspace:
root: ./artifacts
paths:
Expand Down Expand Up @@ -82,11 +82,11 @@ jobs:
name: "Publish Release on Docker Hub"
command: |
docker_tag=$(echo ${CIRCLE_TAG} | cut -b2- )
docker build -t observiq/carbon:${docker_tag} .
docker build -t observiq/stanza:${docker_tag} .
docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_TOKEN}
docker push observiq/carbon:${docker_tag}
docker tag observiq/carbon:${docker_tag} observiq/carbon:latest
docker push observiq/carbon:latest
docker push observiq/stanza:${docker_tag}
docker tag observiq/stanza:${docker_tag} observiq/stanza:latest
docker push observiq/stanza:latest
test-linux:
executor: golang
Expand Down Expand Up @@ -177,8 +177,8 @@ jobs:
name: Setup Workspace
command: mkdir {bin,out,tmp}
- run:
name: Build Carbon Agent
command: GOPROXY=direct go build -v -o ./bin/carbon ./
name: Build Stanza Agent
command: GOPROXY=direct go build -v -o ./bin/stanza ./
- run:
name: Build Log Bench
command: GOPROXY=direct go get github.com/observiq/amazon-log-agent-benchmark-tool/cmd/logbench/ &&
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
- run:
name: Setup VM Workspace
command: gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- 'mkdir -p ~/benchmark/out' &&
gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/carbon << parameters.instance >>:~/benchmark/ &&
gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/stanza << parameters.instance >>:~/benchmark/ &&
gcloud compute scp --ssh-key-file=~/.ssh/key ./bin/logbench << parameters.instance >>:~/benchmark/ &&
gcloud compute scp --ssh-key-file=~/.ssh/key ./.circleci/testdata/benchmark.yaml << parameters.instance >>:~/benchmark/config.yaml &&
gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- 'chmod -R 777 ~/benchmark'
Expand All @@ -228,7 +228,7 @@ jobs:
gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- \
'~/benchmark/logbench -log $(echo stream{1..<< parameters.files >>}.log | tr " " ,) \
-rate << parameters.rate >> -t << parameters.duration >> -r 30s -f 2s -out ~/benchmark/out/results.json \
~/benchmark/carbon --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml --cpu_profile ~/benchmark/out/cpu.pprof --cpu_profile_duration 30s \
~/benchmark/stanza --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml --cpu_profile ~/benchmark/out/cpu.pprof --cpu_profile_duration 30s \
--mem_profile ~/benchmark/out/mem.pprof --mem_profile_delay 10s > ~/benchmark/out/notes 2>&1'
- unless:
condition: << parameters.profile >>
Expand All @@ -239,7 +239,7 @@ jobs:
gcloud compute ssh << parameters.instance >> --ssh-key-file=~/.ssh/key --ssh-flag="-o LogLevel=QUIET" -- \
'~/benchmark/logbench -log $(echo stream{1..<< parameters.files >>}.log | tr " " ,) \
-rate << parameters.rate >> -t << parameters.duration >> -r 30s -f 2s -out ~/benchmark/out/results.json \
~/benchmark/carbon --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml > ~/benchmark/out/notes 2>&1'
~/benchmark/stanza --database ~/benchmark/logagent.db --config ~/benchmark/config.yaml > ~/benchmark/out/notes 2>&1'
- run:
name: Retrieve Results
Expand Down
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
artifacts/carbon_darwin_amd64
artifacts/carbon_windows_amd64
artifacts/stanza_darwin_amd64
artifacts/stanza_windows_amd64
.git/
dev/
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Description

If reporting a bug, please fill out the following additional information:
- Version (`carbon version`):
- Version (`stanza version`):
- OS version:
- Config file:
- Debug logs (use `--debug` flag):
53 changes: 27 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,44 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [0.9.11] - 2020-08-24
### Added
- The 'filter' operator

### Changed
- Renamed project to `stanza`
- Move `testutil` package out of `internal`

## [0.9.10] - 2020-08-20
### Added
- The `Resource` field was added to Entry ([PR95](https://github.com/observIQ/carbon/pull/95))
- The `Identifier` helper was created to assist with writing to `Resource` ([PR95](https://github.com/observIQ/carbon/pull/95))
- The `Resource` field was added to Entry ([PR95](https://github.com/observIQ/stanza/pull/95))
- The `Identifier` helper was created to assist with writing to `Resource` ([PR95](https://github.com/observIQ/stanza/pull/95))

### Removed
- The `Tags` field was removed from Entry ([PR95](https://github.com/observIQ/carbon/pull/95))
- The `Tags` field was removed from Entry ([PR95](https://github.com/observIQ/stanza/pull/95))

### Changed
- The `host_metadata` operator now writes to an entry's `Resource` field, instead of Labels
- The `host_labeler` helper has been renamed `host_identifier`
- The `metadata` operator embeds the `Identifier` helper and supports writing to `Resource`
- Input operators embed the `Identifier` helper and support writing to `Resource`
- The `k8s_event` operator now supports the `write_to`, `labels`, and `resource` configuration options
- Multiline for `file_input` now supports matching on new lines characters ([PR96](https://github.com/observIQ/carbon/pull/96))
- Multiline for `file_input` now supports matching on new lines characters ([PR96](https://github.com/observIQ/stanza/pull/96))

## [0.9.9] - 2020-08-14
### Added
- Kubernetes events input operator ([PR88](https://github.com/observIQ/carbon/pull/88))
- Kubernetes events input operator ([PR88](https://github.com/observIQ/stanza/pull/88))
### Fixed
- Small improvements to test stability
- Fallback to reflection to convert entries to Google Cloud log entries ([PR93](https://github.com/observIQ/carbon/pull/93))
- Fallback to reflection to convert entries to Google Cloud log entries ([PR93](https://github.com/observIQ/stanza/pull/93))

## [0.9.8] - 2020-08-12
### Fixed
- Google Cloud Output failure when sent a field of type uint16 ([PR82](https://github.com/observIQ/carbon/pull/82))
- Google Cloud Output failure when sent a field of type uint16 ([PR82](https://github.com/observIQ/stanza/pull/82))
### Added
- Added a default function to plugin templates ([PR84](https://github.com/observIQ/carbon/pull/84))
- Add a host metadata operator that adds hostname and IP to entries ([PR85](https://github.com/observIQ/carbon/pull/85))
- Google Cloud Output option to enable gzip compression ([PR86](https://github.com/observIQ/carbon/pull/86))
- Added a default function to plugin templates ([PR84](https://github.com/observIQ/stanza/pull/84))
- Add a host metadata operator that adds hostname and IP to entries ([PR85](https://github.com/observIQ/stanza/pull/85))
- Google Cloud Output option to enable gzip compression ([PR86](https://github.com/observIQ/stanza/pull/86))

## [0.9.7] - 2020-08-05
### Changed
Expand All @@ -60,34 +61,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.9.5] - 2020-07-28
### Added
- Configurable `timeout` parameter for the `k8s_metadata_decorator` ([PR54](https://github.com/observIQ/carbon/pull/54))
- Journald operator now supports `start_at` parameter ([PR55](https://github.com/observIQ/carbon/pull/55))
- Configurable `timeout` parameter for the `k8s_metadata_decorator` ([PR54](https://github.com/observIQ/stanza/pull/54))
- Journald operator now supports `start_at` parameter ([PR55](https://github.com/observIQ/stanza/pull/55))

### Changed
- Enhanced plugin parameter metadata structure, to support required/optional and default values ([PR59](https://github.com/observIQ/carbon/pull/59))
- Enhanced plugin parameter metadata structure, to support required/optional and default values ([PR59](https://github.com/observIQ/stanza/pull/59))

### Fixed
- Issue where multiple instances of `syslog_parser` would cause parsing errors ([PR61](https://github.com/observIQ/carbon/pull/61))
- `short destination buffer` error now is handled by increasing encoding buffer size ([PR58](https://github.com/observIQ/carbon/pull/58))
- Issue where omitting the output field in a plugin could result in errors ([PR56](https://github.com/observIQ/carbon/pull/56))
- Issue where multiple instances of `syslog_parser` would cause parsing errors ([PR61](https://github.com/observIQ/stanza/pull/61))
- `short destination buffer` error now is handled by increasing encoding buffer size ([PR58](https://github.com/observIQ/stanza/pull/58))
- Issue where omitting the output field in a plugin could result in errors ([PR56](https://github.com/observIQ/stanza/pull/56))

## [0.9.4] - 2020-07-21
- Allow omitting `id`, defaulting to plugin type if unique within namespace
- Allow omitting `output`, defaulting to the next operator in the pipeline if valid

## [0.9.3] - 2020-07-20
### Added
- Support for multiple encodings in the file input plugin ([PR39](https://github.com/observIQ/carbon/pull/39))
- Install scripts and docker image now include plugins from `carbon-plugins` repository ([PR45](https://github.com/observIQ/carbon/pull/45))
- Publish image to dockerhub ([PR42](https://github.com/observIQ/carbon/pull/42))
- Improved default configuration ([PR41](https://github.com/observIQ/carbon/pull/41))
- Basic developer documentation ([PR43](https://github.com/observIQ/carbon/pull/43))
- Support for multiple encodings in the file input plugin ([PR39](https://github.com/observIQ/stanza/pull/39))
- Install scripts and docker image now include plugins from `stanza-plugins` repository ([PR45](https://github.com/observIQ/stanza/pull/45))
- Publish image to dockerhub ([PR42](https://github.com/observIQ/stanza/pull/42))
- Improved default configuration ([PR41](https://github.com/observIQ/stanza/pull/41))
- Basic developer documentation ([PR43](https://github.com/observIQ/stanza/pull/43))
### Fixed
- JournalD emits `map[string]interface{}` ([PR38](https://github.com/observIQ/carbon/pull/38))
- JournalD emits `map[string]interface{}` ([PR38](https://github.com/observIQ/stanza/pull/38))

## [0.9.2] - 2020-07-13
### Added
- Link `carbon` into `/usr/local/bin` so it's available on most users' `PATH` ([PR28](https://github.com/observIQ/carbon/pull/28))
- Link `stanza` into `/usr/local/bin` so it's available on most users' `PATH` ([PR28](https://github.com/observIQ/stanza/pull/28))
- New parameter `file_name_path` to the file input plugin for cases when just the file name is needed
### Changed
- Renamed `path_field` to `file_path_field` in the file input plugin
Expand All @@ -96,9 +97,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.9.1] - 2020-07-13
### Added
- More specific warning and error messages for common configuration issues ([PR12](https://github.com/observIQ/carbon/pull/12),[PR13](https://github.com/observIQ/carbon/pull/13),[PR14](https://github.com/observIQ/carbon/pull/14))
- More specific warning and error messages for common configuration issues ([PR12](https://github.com/observIQ/stanza/pull/12),[PR13](https://github.com/observIQ/stanza/pull/13),[PR14](https://github.com/observIQ/stanza/pull/14))
### Fixed
- Writing from files being actively written to will sometimes read partial entries ([PR21](https://github.com/observIQ/carbon/pull/21))
- Writing from files being actively written to will sometimes read partial entries ([PR21](https://github.com/observIQ/stanza/pull/21))
- Minor documentation omissions

## [0.9.0] - 2020-07-07
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Contributing to Carbon
# Contributing to Stanza

## Development

You can view and edit the source code by cloning this repository:

```bash
git clone https://github.com/observiq/carbon.git
git clone https://github.com/observiq/stanza.git
```
## Pull Requests

### How to Send Pull Requests

Everyone is welcome to contribute code to `carbon` via
Everyone is welcome to contribute code to `stanza` via
GitHub pull requests (PRs).

To create a new PR, fork the project in GitHub and clone the upstream
repo:

```sh
$ go get -d github.com/observiq/carbon
$ go get -d github.com/observiq/stanza
```

This will put the project in `${GOPATH}/src/github.com/observiq/carbon`. You
This will put the project in `${GOPATH}/src/github.com/observiq/stanza`. You
can alternatively use `git` directly with:

```sh
$ git clone https://github.com/observiq/carbon
$ git clone https://github.com/observiq/stanza
```

This would put the project in the `carbon` directory in
This would put the project in the `stanza` directory in
current working directory.

Enter the newly created directory and add your fork as a new remote:
Expand All @@ -49,7 +49,7 @@ $ git commit
$ git push <YOUR_FORK> <YOUR_BRANCH_NAME>
```

Open a pull request against the main `carbon` repo.
Open a pull request against the main `stanza` repo.

### How to Receive Comments

Expand Down
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM ubuntu:bionic

RUN mkdir -p /carbon_home
ENV CARBON_HOME=/carbon_home
RUN echo "pipeline:\n" >> /carbon_home/config.yaml
RUN mkdir -p /stanza_home
ENV STANZA_HOME=/stanza_home
RUN echo "pipeline:\n" >> /stanza_home/config.yaml
RUN apt-get update && apt-get install -y systemd ca-certificates

COPY ./artifacts/carbon_linux_amd64 /carbon_home/carbon
COPY ./artifacts/carbon-plugins.tar.gz /tmp/carbon-plugins.tar.gz
RUN tar -zxvf /tmp/carbon-plugins.tar.gz -C /carbon_home/
ENTRYPOINT /carbon_home/carbon \
--config /carbon_home/config.yaml \
--database /carbon_home/carbon.db \
--plugin_dir /carbon_home/plugins
COPY ./artifacts/stanza_linux_amd64 /stanza_home/stanza
COPY ./artifacts/stanza-plugins.tar.gz /tmp/stanza-plugins.tar.gz
RUN tar -zxvf /tmp/stanza-plugins.tar.gz -C /stanza_home/
ENTRYPOINT /stanza_home/stanza \
--config /stanza_home/config.yaml \
--database /stanza_home/stanza.db \
--plugin_dir /stanza_home/plugins
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GOARCH=$(shell go env GOARCH)

GIT_SHA=$(shell git rev-parse --short HEAD)

BUILD_INFO_IMPORT_PATH=github.com/observiq/carbon/internal/version
BUILD_INFO_IMPORT_PATH=github.com/observiq/stanza/internal/version
BUILD_X1=-X $(BUILD_INFO_IMPORT_PATH).GitHash=$(GIT_SHA)
ifdef VERSION
BUILD_X2=-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION)
Expand Down Expand Up @@ -34,7 +34,7 @@ generate:

.PHONY: build
build:
CGO_ENABLED=0 go build -o ./artifacts/carbon_$(GOOS)_$(GOARCH) $(BUILD_INFO) .
CGO_ENABLED=0 go build -o ./artifacts/stanza_$(GOOS)_$(GOARCH) $(BUILD_INFO) .

.PHONY: install
install:
Expand Down
Loading

0 comments on commit 445b939

Please sign in to comment.