Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into pkg-status
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse committed Oct 10, 2024
2 parents c10318e + afe87cd commit 8b061f2
Show file tree
Hide file tree
Showing 92 changed files with 2,750 additions and 336 deletions.
27 changes: 27 additions & 0 deletions .chloggen/alexg_fix-service-check-metric-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: datadogreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Use `Check` name from Service Check structure as metric name rather than hardcoded string `service_check`"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35718]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
27 changes: 27 additions & 0 deletions .chloggen/awsfirehosereceiver-cwlogs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: awsfirehosereceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add support for CloudWatch logs

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35077]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
28 changes: 28 additions & 0 deletions .chloggen/enable-goleak-oidcauthextension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: oidcauthextension

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix a goroutine leak during shutdown.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [30438]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
A goroutine leak was found in oidcauthextension. The goroutine leak was caused by the oidcauthextension not closing the idle connections in the client and transport.
# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
27 changes: 27 additions & 0 deletions .chloggen/tlscheckreceiver-addition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: tlscheckreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add TLS Check Receiver component to monitor x.509 certificate expiry

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35423]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
27 changes: 27 additions & 0 deletions .chloggen/use_HOST_PROC_MOUNTINFO.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: hostmetricsreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Use HOST_PROC_MOUNTINFO as part of configuration instead of environment variable

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35504]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ receiver/sshcheckreceiver/ @open-teleme
receiver/statsdreceiver/ @open-telemetry/collector-contrib-approvers @jmacd @dmitryax
receiver/syslogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @andrzej-stencel
receiver/tcplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/tlscheckreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @michael-burt
receiver/udplogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/vcenterreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei @StefanKurek
receiver/wavefrontreceiver/ @open-telemetry/collector-contrib-approvers @samiura
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ body:
- receiver/statsd
- receiver/syslog
- receiver/tcplog
- receiver/tlscheck
- receiver/udplog
- receiver/vcenter
- receiver/wavefront
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ body:
- receiver/statsd
- receiver/syslog
- receiver/tcplog
- receiver/tlscheck
- receiver/udplog
- receiver/vcenter
- receiver/wavefront
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ body:
- receiver/statsd
- receiver/syslog
- receiver/tcplog
- receiver/tlscheck
- receiver/udplog
- receiver/vcenter
- receiver/wavefront
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ body:
- receiver/statsd
- receiver/syslog
- receiver/tcplog
- receiver/tlscheck
- receiver/udplog
- receiver/vcenter
- receiver/wavefront
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/build-and-test-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: build-and-test-darwin
on:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
merge_group:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
env:
TEST_RESULTS: testbed/tests/results/junit/results.xml
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
GOPROXY: https://goproxy1.cncf.selfactuated.dev,direct

# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
darwin-build-unittest-binary:
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Darwin') || github.event_name == 'push' || github.event_name == 'merge_group') }}
runs-on: macos-14
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "~1.22.5"
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-build-cache-${{ runner.os }}-go-${{ 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 test binaries
env:
GOTESTARCH: amd64
run: make gobuildtest GROUP=cgo
- name: Zip test binaries
run: zip -r testbinaries.zip . --include \*builtunitetest.test
- uses: actions/upload-artifact@v4
with:
name: testbinaries
path: ./testbinaries.zip
retention-days: 1
darwin-unittest-matrix:
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Darwin') || github.event_name == 'push' || github.event_name == 'merge_group') }}
needs: [darwin-build-unittest-binary]
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-13]
timeout-minutes: 30
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "~1.22.5"
cache: false
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- uses: actions/download-artifact@v4
with:
name: testbinaries
- name: Unzip binaries to each module
run: unzip testbinaries.zip
- name: Run Unit Tests
run: make -j2 gorunbuilttest GROUP=cgo
darwin-unittest:
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Darwin') || github.event_name == 'push' || github.event_name == 'merge_group') }}
runs-on: macos-latest
needs: [darwin-unittest-matrix]
steps:
- name: Print result
run: echo ${{ needs.darwin-unittest-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.darwin-unittest-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ CMD_MODS_1 := $(shell find ./cmd/[n-z]* $(FIND_MOD_ARGS) -not -path "./cmd/otel*
CMD_MODS := $(CMD_MODS_0) $(CMD_MODS_1)
OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) $(PWD)
ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OTHER_MODS)
CGO_MODS := ./receiver/hostmetricsreceiver

FIND_INTEGRATION_TEST_MODS={ find . -type f -name "*integration_test.go" & find . -type f -name "*e2e_test.go" -not -path "./testbed/*"; }
INTEGRATION_MODS := $(shell $(FIND_INTEGRATION_TEST_MODS) | xargs $(TO_MOD_DIR) | uniq)
Expand Down Expand Up @@ -135,6 +136,14 @@ gotest-with-cover:
@$(MAKE) $(FOR_GROUP_TARGET) TARGET="test-with-cover"
$(GOCMD) tool covdata textfmt -i=./coverage/unit -o ./$(GROUP)-coverage.txt

.PHONY: gobuildtest
gobuildtest:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="buildtest"

.PHONY: gorunbuilttest
gorunbuilttest:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="runbuilttest"

.PHONY: gointegration-test
gointegration-test:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="mod-integration-test"
Expand Down Expand Up @@ -260,6 +269,9 @@ for-other-target: $(OTHER_MODS)
.PHONY: for-integration-target
for-integration-target: $(INTEGRATION_MODS)

.PHONY: for-cgo-target
for-cgo-target: $(CGO_MODS)

# Debugging target, which helps to quickly determine whether for-all-target is working or not.
.PHONY: all-pwd
all-pwd:
Expand Down Expand Up @@ -539,6 +551,8 @@ clean:
find . -type f -name 'coverage.out' -delete
find . -type f -name 'integration-coverage.txt' -delete
find . -type f -name 'integration-coverage.html' -delete
@echo "Removing built binary files"
find . -type f -name 'builtunitetest.test' -delete

.PHONY: generate-gh-issue-templates
generate-gh-issue-templates:
Expand Down
13 changes: 13 additions & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ GOTEST_OPT_WITH_INTEGRATION_COVERAGE=$(GOTEST_OPT_WITH_INTEGRATION) -coverprofil
GOCMD?= go
GOOS=$(shell $(GOCMD) env GOOS)
GOARCH=$(shell $(GOCMD) env GOARCH)
GOTESTARCH?=$(GOARCH)

# In order to help reduce toil related to managing tooling for the open telemetry collector
# this section of the makefile looks at only requiring command definitions to be defined
Expand Down Expand Up @@ -140,6 +141,18 @@ do-unit-tests-with-cover: $(GOTESTSUM)
$(GOTESTSUM) $(GOTESTSUM_OPT) --packages="./..." -- $(GOTEST_OPT_WITH_COVERAGE)
$(GOCMD) tool cover -html=coverage.txt -o coverage.html

.PHONY: buildtest
buildtest:
ifneq (,$(wildcard ./*.go))
GOARCH=$(GOTESTARCH) CGO_ENABLED=1 $(GOCMD) test -c -o builtunitetest.test
endif

.PHONY: runbuilttest
runbuilttest: $(GOTESTSUM)
ifneq (,$(wildcard ./builtunitetest.test))
$(GOTESTSUM) --raw-command -- $(GOCMD) tool test2json -p "./..." -t ./builtunitetest.test -test.v -test.failfast -test.timeout $(GOTEST_TIMEOUT)
endif

.PHONY: mod-integration-test
mod-integration-test: $(GOTESTSUM)
@echo "running $(GOCMD) integration test ./... in `pwd`"
Expand Down
28 changes: 14 additions & 14 deletions confmap/provider/s3provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provide
go 1.22.0

require (
github.com/aws/aws-sdk-go-v2 v1.32.1
github.com/aws/aws-sdk-go-v2/config v1.27.42
github.com/aws/aws-sdk-go-v2/service/s3 v1.65.1
github.com/aws/aws-sdk-go-v2 v1.32.2
github.com/aws/aws-sdk-go-v2/config v1.27.43
github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/confmap v1.17.1-0.20241008154146-ea48c09c31ae
go.uber.org/goleak v1.3.0
Expand All @@ -14,19 +14,19 @@ require (

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.40 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.16 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.20 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.21 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect
github.com/aws/smithy-go v1.22.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
Expand Down
Loading

0 comments on commit 8b061f2

Please sign in to comment.