Skip to content

Commit

Permalink
Merge branch 'open-telemetry:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jono Yan authored Jul 6, 2022
2 parents 2181d53 + 1fca142 commit f3db7d1
Show file tree
Hide file tree
Showing 1,821 changed files with 132,988 additions and 39,653 deletions.
7 changes: 0 additions & 7 deletions .github/ALLOWLIST
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
cmd/configschema
examples/demo/client
examples/demo/server
exporter/opencensusexporter
exporter/parquetexporter
extension/fluentbitextension
extension/httpforwarder
Expand All @@ -29,17 +28,11 @@ internal/sharedcomponent
internal/tools
pkg/batchperresourceattr
pkg/experimentalmetricmetadata
pkg/translator/jaeger
pkg/translator/opencensus
pkg/translator/prometheusremotewrite
pkg/translator/signalfx
pkg/translator/zipkin
pkg/winperfcounters
processor/deltatorateprocessor
processor/metricsgenerationprocessor
receiver/opencensusreceiver
receiver/podmanreceiver
receiver/simpleprometheusreceiver
receiver/simpleprometheusreceiver/examples/federation/prom-counter
testbed
testbed/mockdatareceivers/mockawsxrayreceiver
49 changes: 35 additions & 14 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions .github/ISSUE_TEMPLATE/new_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,28 @@ assignees: ''
---

## The purpose and use-cases of the new component
<!--
<!--
This information can be used later on to populate the README for the component. See an example overview [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsecscontainermetricsreceiver#overview).
-->

## Example configuration for the component
<!--
<!--
This will be used later on when creating `config.go` and added to README as well. See this receiver as an [example](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver#getting-started).
-->

## Telemetry data types supported
<!--
<!--
Any combination of traces, metrics and/or logs is valid here.
-->

## Is this a vendor-specific component? If so, are you proposing to contribute this as a representative of the vendor?
<!--
A vendor-specific component directly interfaces with a vendor-specific API and is expected to be maintained by a representative of the same vendor.
-->


## Sponsor (Optional)
<!--
<!--
A sponsor is an approver who will be in charge of being the official reviewer of the code. For vendor-specific components, it's good to have a volunteer sponsor. If you can't find one, we'll assign one in a round-robin fashion. For non-vendor components, having a sponsor means that your use case has been validated.
If there are no sponsors yet for the component, it's fine: use the issue as a means to try to find a sponsor for your component.
Expand Down
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,6 @@ updates:
directory: "/internal/splunk"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/internal/stanza"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/internal/tools"
schedule:
Expand All @@ -366,6 +362,10 @@ updates:
directory: "/pkg/resourcetotelemetry"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/pkg/stanza"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/pkg/translator/jaeger"
schedule:
Expand All @@ -374,6 +374,10 @@ updates:
directory: "/pkg/translator/opencensus"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/pkg/translator/prometheus"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/pkg/translator/prometheusremotewrite"
schedule:
Expand Down Expand Up @@ -490,10 +494,6 @@ updates:
directory: "/receiver/collectdreceiver"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/receiver/couchbasereceiver"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/receiver/couchdbreceiver"
schedule:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
TEST_RESULTS: testbed/tests/results/junit/results.xml

jobs:
windows-unittest:
windows-unittest-matrix:
strategy:
matrix:
group:
Expand Down Expand Up @@ -44,3 +44,9 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Run Unit tests
run: make gotest GROUP=${{ matrix.group }}
windows-unittest:
runs-on: windows-latest
needs: [windows-unittest-matrix]
steps:
- name: Unit Tests Complete
run: echo "Windows unit tests complete"
74 changes: 67 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Cache Lint Build
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -110,6 +116,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: CheckDoc
run: make checkdoc
- name: Porto
Expand Down Expand Up @@ -155,6 +167,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Cache Test Build
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -211,6 +229,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Correctness
run: make -C testbed run-correctness-traces-tests
correctness-metrics:
Expand All @@ -231,6 +255,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Correctness
run: make -C testbed run-correctness-metrics-tests

Expand All @@ -248,12 +278,24 @@ jobs:
needs: [unittest, integration-tests, lint]
strategy:
matrix:
binary:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
- windows_amd64
os:
- darwin
- linux
- windows
arch:
- 386
- amd64
- arm
- arm64
exclude:
- os: darwin
arch: 386
- os: darwin
arch: arm
- os: windows
arch: arm
- os: windows
arch: arm64
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand All @@ -269,8 +311,14 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build Collector ${{ matrix.binary }}
run: make otelcontribcol-${{ matrix.binary }}
run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} otelcontribcol
- name: Upload Collector Binaries
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -397,6 +445,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Download Binaries
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -456,6 +510,12 @@ jobs:
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Set Release Tag
id: github_tag
run: ./.github/workflows/scripts/set_release_tag.sh
Expand Down
78 changes: 70 additions & 8 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This action requires that any PR targeting the main branch should touch at
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip
# Changelog" label to disable this action.
# This action requires that any PR targeting the main branch should add a
# yaml file to the ./unreleased/ directory. If a CHANGELOG entry is not required,
# or if performing maintance on the Changelog, add the "Skip Changelog" label to
# disable this action.

name: changelog

Expand All @@ -15,19 +16,80 @@ jobs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}}

steps:
- uses: actions/checkout@v3
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Cache Go
id: go-cache
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: changelog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Check for CHANGELOG changes
- name: Ensure no changes to the CHANGELOG
run: |
# Only the latest commit of the feature branch is available
# automatically. To diff with the base branch, we need to
# fetch that too (and we only need its latest commit).
git fetch origin ${{ github.base_ref }} --depth=1
if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]]
then
echo "A CHANGELOG was modified. Looks good!"
echo "The CHANGELOG should not be directly modified."
echo "Please add a .yaml file to the ./unreleased/ directory."
echo "See CONTRIBUTING.md for more details."
echo "Alternately, add the \"Skip Changelog\" label if this job should be skipped."
false
else
echo "The CHANGELOG was not modified."
fi
- name: Ensure ./unreleased/*.yaml addition(s)
run: |
git fetch origin ${{ github.base_ref }} --depth=1
if [[ 1 -gt $(git diff --diff-filter=A --name-only FETCH_HEAD ./unreleased | grep -c \\.yaml) ]]
then
echo "No changelog entry was added to the ./unreleased/ directory."
echo "Please add a .yaml file to the ./unreleased/ directory."
echo "See CONTRIBUTING.md for more details."
echo "Alternately, add the \"Skip Changelog\" label if this job should be skipped."
false
else
echo "A changelog entry was added to the ./unreleased/ directory!"
fi
- name: Ensure no other ./unreleased/*.yaml changes
run: |
git fetch origin ${{ github.base_ref }} --depth=1
if [[ 0 -eq $(git diff --diff-filter=CDMRTUXB --name-only FETCH_HEAD ./unreleased | grep -c \\.yaml) ]]
then
echo "No other changes to ./unreleased/ directory!"
else
echo "No CHANGELOG was modified."
echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required."
echo "Unrelated changes to ./unreleased/ directory detected."
echo "Only a single file may be added to ./unreleased/ directory per PR. No other changes are allowed to this directory."
echo "See CONTRIBUTING.md for more details."
echo "Alternately, add the \"Skip Changelog\" label if this job should be skipped."
false
fi
- name: Validate ./unreleased/*.yaml changes
run: |
make chlog-validate \
|| { echo "New ./unreleased/*.yaml file failed validation."; exit 1; }
# In order to validate any links in the yaml file, render the config to markdown
- name: Render unreleased changelog entries
run: make chlog-preview > changelog_preview.md
- name: Install markdown-link-check
run: npm install -g markdown-link-check
- name: Run markdown-link-check
run: |
markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
changelog_preview.md \
|| { echo "Check that anchor links are lowercase"; exit 1; }
5 changes: 3 additions & 2 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Get changed files
id: changes
run: |
echo "::set-output name=md::$(git diff --name-only --diff-filter=ACMRTUXB origin/${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
echo "::set-output name=md::$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
check-links:
runs-on: ubuntu-latest
needs: changedfiles
Expand All @@ -38,4 +38,5 @@ jobs:
markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
${{needs.changedfiles.outputs.md}}
${{needs.changedfiles.outputs.md}} \
|| { echo "Check that anchor links are lowercase"; exit 1; }
15 changes: 15 additions & 0 deletions .github/workflows/create-dependabot-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: dependabot-pr

on:
workflow_dispatch:

jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run dependabot-pr.sh
run: ./.github/workflows/scripts/dependabot-pr.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit f3db7d1

Please sign in to comment.