Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
xavirg authored Jan 24, 2025
2 parents 3289814 + a05740a commit 0129553
Show file tree
Hide file tree
Showing 103 changed files with 1,261 additions and 471 deletions.
13 changes: 13 additions & 0 deletions .chloggen/add-multiple-endpoints-support-httpcheckreceiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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: httpcheckreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Added support for specifying multiple endpoints in the `httpcheckreceiver` using the `endpoints` field. Users can now monitor multiple URLs with a single configuration block, improving flexibility and reducing redundancy."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [37121]
27 changes: 27 additions & 0 deletions .chloggen/cumulative-to-delta-processor-metric-type-filter.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: cumulativetodeltaprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add metric type filter for cumulativetodelta processor

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

# (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: []
27 changes: 27 additions & 0 deletions .chloggen/mowies-deprecate-githubgen.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: githubgen

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Switch over all usages of githubgen to the new tool location, since the old tool was deprecated

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

# (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: []
11 changes: 11 additions & 0 deletions .chloggen/pubsubreceiver-encodingextensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
change_type: enhancement

component: googlecloudpubsubreceiver

note: Added support for encoding extensions.

issues: [37109]

subtext:

change_logs: [user]
6 changes: 1 addition & 5 deletions .github/ALLOWLIST
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# Code generated by githubgen. DO NOT EDIT.
#####################################################
#
# List of components in OpenTelemetry Collector Contrib
# List of components
# waiting on owners to be assigned
#
#####################################################
#
# Learn about membership in OpenTelemetry community:
# https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md
#
#
# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
#
Expand Down
14 changes: 6 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Code generated by githubgen. DO NOT EDIT.
#####################################################
#
# List of codeowners for OpenTelemetry Collector Contrib
# List of codeowners
#
#####################################################
#
# Learn about membership in OpenTelemetry community:
# https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md
#
#
# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
#
Expand Down Expand Up @@ -317,16 +313,18 @@ testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry

#####################################################
#
# List of distribution maintainers for OpenTelemetry Collector Contrib
# List of distribution maintainers
#
#####################################################

reports/distributions/core.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/contrib.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/k8s.yaml @open-telemetry/collector-contrib-approvers

#####################################################
#
## UNMAINTAINED components

#
#####################################################
exporter/kineticaexporter/ @open-telemetry/collector-contrib-approvers
exporter/opensearchexporter/ @open-telemetry/collector-contrib-approvers
extension/observer/ecstaskobserver/ @open-telemetry/collector-contrib-approvers
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/check-codeowners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,40 @@ concurrency:
cancel-in-progress: true

jobs:
setup-environment:
check-codeowners:
timeout-minutes: 30
runs-on: ubuntu-24.04
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'open-telemetry/opentelemetry-collector-contrib' }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.22.8"
cache: false
- name: Cache Go
id: go-cache

- name: Cache Go Tools
id: go-tools-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
check-codeowners:
runs-on: ubuntu-24.04
needs: [setup-environment]
steps:
- uses: actions/checkout@v4
- name: Gen githubgen tool
key: go-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}

- name: Install tools
if: github.repository == 'open-telemetry/opentelemetry-collector-contrib' && steps.go-tools-cache.outputs.cache-hit != 'true'
run: |
make githubgen-install
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
make install-tools
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
path: pr

- name: Gen CODEOWNERS
run: |
cd pr
GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} githubgen
GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} ../.tools/githubgen codeowners
git diff -s --exit-code || (echo 'Generated code is out of date, please apply this diff and commit the changes in this PR.' && git diff && exit 1)
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ linters-settings:
explicit-exhaustive-switch: true
ignore-enum-members: "pmetric.MetricTypeEmpty"

nolintlint:
require-specific: true

predeclared:
ignore: copy

Expand Down Expand Up @@ -201,6 +204,7 @@ linters:
- gosec
- govet
- misspell
- nolintlint
- predeclared
- reassign
- revive
Expand All @@ -227,3 +231,7 @@ issues:
- text: "G115:"
linters:
- gosec
- path: "pagefile.go" # This exclusion is required for Windows only
text: "cachedBytes"
linters:
- unused
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ When submitting a component to the community, consider breaking it down into sep
* `make generate`
* `make multimod-verify`
* `make generate-gh-issue-templates`
* `make gengithub`
* `make addlicense`
* **Second PR** should include the concrete implementation of the component. If the
size of this PR is larger than the recommended size consider splitting it in
Expand Down
21 changes: 8 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,16 @@ generate: install-tools
PATH="$$PWD/.tools:$$PATH" $(MAKE) for-all CMD="$(GOCMD) generate ./..."
$(MAKE) gofmt

.PHONY: githubgen-install
githubgen-install:
cd cmd/githubgen && $(GOCMD) install .

.PHONY: gengithub
gengithub: githubgen-install
githubgen
gengithub: $(GITHUBGEN)
$(GITHUBGEN)

.PHONY: gendistributions
gendistributions: githubgen-install
githubgen distributions
gendistributions: $(GITHUBGEN)
$(GITHUBGEN) distributions

.PHONY: update-codeowners
update-codeowners: gengithub generate
update-codeowners: generate gengithub

FILENAME?=$(shell git branch --show-current)
.PHONY: chlog-new
Expand All @@ -344,7 +340,7 @@ chlog-update: $(CHLOGGEN)

.PHONY: genotelcontribcol
genotelcontribcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml --output-path cmd/otelcontribcol
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml

# Build the Collector executable.
.PHONY: otelcontribcol
Expand All @@ -360,7 +356,7 @@ otelcontribcollite: genotelcontribcol

.PHONY: genoteltestbedcol
genoteltestbedcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml --output-path cmd/oteltestbedcol
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml

# Build the Collector executable, with only components used in testbed.
.PHONY: oteltestbedcol
Expand Down Expand Up @@ -559,8 +555,7 @@ clean:

.PHONY: generate-gh-issue-templates
generate-gh-issue-templates:
cd cmd/githubgen && $(GOCMD) install .
githubgen issue-templates
$(GITHUBGEN) issue-templates

.PHONY: checks
checks:
Expand Down
1 change: 1 addition & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ MISSPELL_CORRECTION := $(TOOLS_BIN_DIR)/misspell -w
LINT := $(TOOLS_BIN_DIR)/golangci-lint
MULTIMOD := $(TOOLS_BIN_DIR)/multimod
CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen
GITHUBGEN := $(TOOLS_BIN_DIR)/githubgen
GOIMPORTS := $(TOOLS_BIN_DIR)/goimports
PORTO := $(TOOLS_BIN_DIR)/porto
CHECKFILE := $(TOOLS_BIN_DIR)/checkfile
Expand Down
1 change: 0 additions & 1 deletion cmd/githubgen/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ abhishek-at-cloudwerx
adcharre
Caleb-Hurshman
cemdk
cheempz
dlopes7
driverpt
dsimil
Expand Down
4 changes: 3 additions & 1 deletion cmd/githubgen/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
type: githubgen

status:
stability:
deprecated: []
class: cmd
codeowners:
active: [atoulme]
active: [atoulme]
1 change: 1 addition & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dist:
name: otelcontribcol
description: Local OpenTelemetry Collector Contrib binary, testing only.
version: 0.118.0-dev
output_path: ./cmd/otelcontribcol

extensions:
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.118.1-0.20250121185328-fbefb22cc2b3
Expand Down
1 change: 1 addition & 0 deletions cmd/oteltestbedcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist:
name: oteltestbedcol
description: OpenTelemetry Collector binary for testbed only tests.
version: 0.118.0-dev
output_path: ./cmd/oteltestbedcol

extensions:
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.118.1-0.20250121185328-fbefb22cc2b3
Expand Down
2 changes: 0 additions & 2 deletions cmd/telemetrygen/internal/logs/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ func (w worker) simulateLogs(res *resource.Resource, exporterFunc func() (sdklog

if w.spanID != "" {
// we checked this for errors in the Validate function
// nolint: errcheck
b, _ := hex.DecodeString(w.spanID)
sid = trace.SpanID(b)
}
if w.traceID != "" {
// we checked this for errors in the Validate function
// nolint: errcheck
b, _ := hex.DecodeString(w.traceID)
tid = trace.TraceID(b)
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/telemetrygen/internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,12 @@ func exemplarsFromConfig(c *Config) []metricdata.Exemplar[int64] {

if c.TraceID != "" {
// we validated this already during the Validate() function for config
// nolint: errcheck
traceID, _ := hex.DecodeString(c.TraceID)
exemplar.TraceID = traceID
}

if c.SpanID != "" {
// we validated this already during the Validate() function for config
// nolint: errcheck
spanID, _ := hex.DecodeString(c.SpanID)
exemplar.SpanID = spanID
}
Expand Down
2 changes: 0 additions & 2 deletions connector/datadogconnector/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ func TestExamples(t *testing.T) {
t.Setenv("DD_API_KEY", "aaaaaaaaa")
factories := newTestComponents(t)
const configFile = "./examples/config.yaml"
// https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594
// nolint:staticcheck
_, err := otelcoltest.LoadConfigAndValidate(configFile, factories)
require.NoError(t, err, "All yaml config must validate. Please ensure that all necessary component factories are added in newTestComponents()")
}
Expand Down
2 changes: 0 additions & 2 deletions connector/servicegraphconnector/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func TestLoadConfig(t *testing.T) {
require.NoError(t, err)

factories.Connectors[metadata.Type] = NewFactory()
// https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594
// nolint:staticcheck
cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "service-graph-connector-config.yaml"), factories)

// Verify
Expand Down
2 changes: 1 addition & 1 deletion connector/servicegraphconnector/internal/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s *Store) Expire() {
defer s.mtx.Unlock()

// Iterates until no more items can be evicted
for s.tryEvictHead() { // nolint
for s.tryEvictHead() {
}
}

Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/internal/batch/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"errors"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/kinesis/types" //nolint:staticcheck // Some encoding types uses legacy prototype version
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
"go.opentelemetry.io/collector/consumer/consumererror"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/compress"
Expand Down
Loading

0 comments on commit 0129553

Please sign in to comment.