forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'pkg/stanza/' from commit 'c912ec5cdb776ada95f4f06fd97d1e315f07fe14'
- Loading branch information
Showing
491 changed files
with
46,331 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
##################################################### | ||
# | ||
# List of approvers for OpenTelemetry Log Collection | ||
# | ||
##################################################### | ||
# | ||
# Learn about membership in OpenTelemetry community: | ||
# https://github.com/open-telemetry/community/blob/main/community-membership.md | ||
# | ||
# | ||
# Learn about CODEOWNERS file format: | ||
# https://help.github.com/en/articles/about-code-owners | ||
# | ||
|
||
* @open-telemetry/log-collection-approvers |
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,24 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
ignore: | ||
- "internal/tools/*" | ||
|
||
coverage: | ||
precision: 1 | ||
round: down | ||
range: "70...100" | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 0.5% | ||
patch: | ||
default: | ||
target: 50% | ||
threshold: 0% | ||
|
||
comment: | ||
layout: "reach,diff,flags,tree" | ||
behavior: default | ||
require_changes: yes |
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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "gomod" | ||
directory: "/internal/tools" | ||
schedule: | ||
interval: "weekly" |
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,50 @@ | ||
name: Run CodeCov | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
env: | ||
# Path to where test results will be saved. | ||
TEST_RESULTS: /tmp/test-results | ||
# Default minimum version of Go to support. | ||
DEFAULT_GO_VERSION: 1.17 | ||
jobs: | ||
test-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ env.DEFAULT_GO_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Environment | ||
run: | | ||
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | ||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | ||
- name: Module cache | ||
uses: actions/[email protected] | ||
env: | ||
cache-name: go-mod-cache | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} | ||
- name: Run coverage tests | ||
run: | | ||
make test-coverage | ||
mkdir $TEST_RESULTS | ||
cp coverage.out $TEST_RESULTS | ||
cp coverage.txt $TEST_RESULTS | ||
cp coverage.html $TEST_RESULTS | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.txt | ||
fail_ci_if_error: false | ||
verbose: true | ||
- name: Store coverage test output | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: opentelemetry-log-collection-test-output | ||
path: ${{ env.TEST_RESULTS }} |
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,37 @@ | ||
name: "CodeQL Analysis" | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# ┌───────────── minute (0 - 59) | ||
# │ ┌───────────── hour (0 - 23) | ||
# │ │ ┌───────────── day of the month (1 - 31) | ||
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | ||
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# * * * * * | ||
- cron: '30 1 * * *' | ||
|
||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
CodeQL-Build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: go | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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,23 @@ | ||
name: contrib-tests | ||
on: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+.* | ||
pull_request: | ||
|
||
jobs: | ||
contrib_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Run Contrib Tests | ||
run: | | ||
contrib_path=/tmp/opentelemetry-collector-contrib | ||
git clone https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path | ||
./check-contrib.sh |
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,30 @@ | ||
name: Run Gosec | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# ┌───────────── minute (0 - 59) | ||
# │ ┌───────────── hour (0 - 23) | ||
# │ │ ┌───────────── day of the month (1 - 31) | ||
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | ||
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# │ │ │ │ │ | ||
# * * * * * | ||
- cron: '30 1 * * *' | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Gosec Security Scanner | ||
uses: securego/gosec@master | ||
with: | ||
args: './...' |
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,146 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Install tools | ||
if: steps.tool-cache.outputs.cache-hit != 'true' | ||
run: make install-tools | ||
- name: Add Permissions to Tool Binaries | ||
run: chmod -R +x ~/go/bin | ||
- name: Check | ||
run: make ci-check | ||
|
||
test-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
||
test-macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
||
test-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: /Users/runneradmin/go/pkg/mod | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
||
bench-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Benchmarks | ||
run: make bench | ||
|
||
bench-macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Benchmarks | ||
run: make bench | ||
|
||
bench-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.17 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: /Users/runneradmin/go/pkg/mod | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Benchmarks | ||
run: make bench |
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,13 @@ | ||
dev/* | ||
.DS_Store | ||
tmp/* | ||
local/* | ||
**/coverage.txt | ||
**/coverage.html | ||
artifacts/* | ||
.vscode/* | ||
gen/ | ||
.idea/* | ||
coverage.out | ||
coverage.out.bak | ||
coverage.txt.bak |
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,37 @@ | ||
--- | ||
run: | ||
issues-exit-code: 1 | ||
tests: true | ||
skip-dirs: | ||
skip-dirs-use-default: false | ||
skip-files: | ||
linters: | ||
disable: | ||
- errcheck | ||
enable: | ||
- gofmt | ||
- gci | ||
- bodyclose | ||
- goconst | ||
- gocritic | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- unconvert | ||
- unparam | ||
- whitespace | ||
- ineffassign | ||
linters-settings: | ||
gci: | ||
local-prefixes: github.com/open-telemetry/opentelemetry-log-collection | ||
goconst: | ||
min-occurrences: 5 | ||
revive: | ||
# minimal confidence for issues, default is 0.8 | ||
min-confidence: 0.8 | ||
issues: | ||
exclude-rules: | ||
- path: operator/builtin/input/windows/xml\.go | ||
linters: | ||
- unused | ||
- deadcode |
Oops, something went wrong.