Skip to content

Commit

Permalink
Merge branch 'main' into zpagesextension-add-expvar
Browse files Browse the repository at this point in the history
  • Loading branch information
HongChenTW authored Jan 7, 2025
2 parents 82be62c + 6c99ba0 commit 73764a9
Show file tree
Hide file tree
Showing 185 changed files with 3,404 additions and 1,035 deletions.
25 changes: 25 additions & 0 deletions .chloggen/add-scrapertest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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. otlpreceiver)
component: scrapertest

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add scrapertest package in a separate module

# One or more tracking issues or pull requests related to the change
issues: [11988]

# (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:

# 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: [api]
25 changes: 25 additions & 0 deletions .chloggen/dep-comp-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate component_test in favor of metadatatest

# One or more tracking issues or pull requests related to the change
issues: [11812]

# (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:

# 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: [api]
25 changes: 25 additions & 0 deletions .chloggen/dep-component-type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate receivertest.NewNopFactoryForType

# One or more tracking issues or pull requests related to the change
issues: [11993]

# (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:

# 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: [api]
25 changes: 25 additions & 0 deletions .chloggen/experimental.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: extension/experimental

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate extension/experimental in favor of extension/xextension

# One or more tracking issues or pull requests related to the change
issues: [12010]

# (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:

# 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: [api]
25 changes: 25 additions & 0 deletions .chloggen/mv-scraper-helper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Move scraperhelper under scraper and in a separate module.

# One or more tracking issues or pull requests related to the change
issues: [11003]

# (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:

# 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: [api]
25 changes: 25 additions & 0 deletions .chloggen/rm-merge-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove Merge function from experimental Request interface

# One or more tracking issues or pull requests related to the change
issues: [12012]

# (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:

# 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: [api]
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exporter/nopexporter @open-telemetry/collector-approvers @evan-bradle
pdata/ @open-telemetry/collector-approvers @BogdanDrutu @dmitryax
receiver/nopreceiver @open-telemetry/collector-approvers @evan-bradley
service/internal/graph @open-telemetry/collector-approvers @djaglowski
extension/experimental/storage @open-telemetry/collector-approvers @swiatekm
extension/xextension @open-telemetry/collector-approvers @swiatekm

# Profiling-related modules
pdata/pprofile @open-telemetry/collector-approvers @mx-psi @dmathieu
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/build-and-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ permissions: read-all

jobs:
windows-unittest:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -41,7 +45,11 @@ jobs:
run: make gotest

windows-service-test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
- name: Run Unit Tests
run: |
make -j4 gotest-with-junit
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: test-results-${{ runner.os }}-${{ matrix.runner }}-${{ matrix.go-version }}
path: internal/tools/testresults/
Expand Down
58 changes: 41 additions & 17 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ on:
current-beta:
required: true
description: Current version (beta, like 0.95.1). Don't include `v`.

permissions: read-all

jobs:
#validate-version format
validate-versions:
validate-versions-format:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -58,10 +60,9 @@ jobs:
exit 1
fi
# Releasing opentelemetry-collector
prepare-release:
check-blockers:
needs:
- validate-versions
- validate-versions-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -91,6 +92,41 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: open-telemetry/opentelemetry-collector-contrib
run: ./.github/workflows/scripts/release-check-build-status.sh

create-release-issue:
needs:
- check-blockers
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# To keep track of the progress, it might be helpful to create a tracking issue similar to #6067. You are responsible
# for all of the steps under the "Performed by collector release manager" heading. Once the issue is created, you can
# create the individual ones by hovering them and clicking the "Convert to issue" button on the right hand side.
- name: Create issue for tracking release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CANDIDATE_BETA: ${{ inputs.candidate-beta }}
CANDIDATE_STABLE: ${{ inputs.candidate-stable }}
CURRENT_BETA: ${{ inputs.current-beta }}
CURRENT_STABLE: ${{ inputs.current-stable }}
REPO: open-telemetry/opentelemetry-collector
run: ./.github/workflows/scripts/release-create-tracking-issue.sh

# Releasing opentelemetry-collector
prepare-release:
needs:
- check-blockers
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
Expand All @@ -108,15 +144,3 @@ jobs:
CURRENT_BETA: ${{ inputs.current-beta }}
CURRENT_STABLE: ${{ inputs.current-stable }}
run: ./.github/workflows/scripts/release-prepare-release.sh
# To keep track of the progress, it might be helpful to create a tracking issue similar to #6067. You are responsible
# for all of the steps under the "Performed by collector release manager" heading. Once the issue is created, you can
# create the individual ones by hovering them and clicking the "Convert to issue" button on the right hand side.
- name: Create issue for tracking release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CANDIDATE_BETA: ${{ inputs.candidate-beta }}
CANDIDATE_STABLE: ${{ inputs.candidate-stable }}
CURRENT_BETA: ${{ inputs.current-beta }}
CURRENT_STABLE: ${{ inputs.current-stable }}
REPO: open-telemetry/opentelemetry-collector
run: ./.github/workflows/scripts/release-create-tracking-issue.sh
43 changes: 43 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,50 @@ linters-settings:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
rules:
# Blank import should be only in a main or test package, or have a comment justifying it.
- name: blank-imports
# context.Context() should be the first parameter of a function when provided as argument.
- name: context-as-argument
# Basic types should not be used as a key in `context.WithValue`
- name: context-keys-type
# Importing with `.` makes the programs much harder to understand
- name: dot-imports
# Empty blocks make code less readable and could be a symptom of a bug or unfinished refactoring.
- name: empty-block
# for better readability, variables of type `error` must be named with the prefix `err`.
- name: error-naming
# for better readability, the errors should be last in the list of returned values by a function.
- name: error-return
# for better readability, error messages should not be capitalized or end with punctuation or a newline.
- name: error-strings
# report when replacing `errors.New(fmt.Sprintf())` with `fmt.Errorf()` is possible
- name: errorf
# incrementing an integer variable by 1 is recommended to be done using the `++` operator
- name: increment-decrement
# highlights redundant else-blocks that can be eliminated from the code
- name: indent-error-flow
# This rule suggests a shorter way of writing ranges that do not use the second value.
- name: range
# receiver names in a method should reflect the struct name (p for Person, for example)
- name: receiver-naming
# redefining built in names (true, false, append, make) can lead to bugs very difficult to detect.
- name: redefines-builtin-id
# redundant else-blocks that can be eliminated from the code.
- name: superfluous-else
# prevent confusing name for variables when using `time` package
- name: time-naming
# warns when an exported function or method returns a value of an un-exported type.
- name: unexported-return
# spots and proposes to remove unreachable code. also helps to spot errors
- name: unreachable-code
# Functions or methods with unused parameters can be a symptom of an unfinished refactoring or a bug.
- name: unused-parameter
# Since Go 1.18, interface{} has an alias: any. This rule proposes to replace instances of interface{} with any.
- name: use-any
# report when a variable declaration can be simplified
- name: var-declaration
# warns when initialism, variable or package naming conventions are not followed.
- name: var-naming

depguard:
rules:
Expand Down
2 changes: 1 addition & 1 deletion client/doc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func Example_receiver() {
// Your receiver get a next consumer when it's constructed
next, err := consumer.NewTraces(func(ctx context.Context, td ptrace.Traces) error {
next, err := consumer.NewTraces(func(_ context.Context, _ ptrace.Traces) error {
return nil
})
if err != nil {
Expand Down
9 changes: 5 additions & 4 deletions cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,18 @@ var replaceModules = []string{
"/extension",
"/extension/auth",
"/extension/auth/authtest",
"/extension/experimental/storage",
"/extension/extensioncapabilities",
"/extension/extensiontest",
"/extension/zpagesextension",
"/extension/xextension",
"/featuregate",
"/internal/memorylimiter",
"/internal/fanoutconsumer",
"/internal/sharedcomponent",
"/otelcol",
"/pdata",
"/pdata/testdata",
"/pdata/pprofile",
"/pipeline",
"/pipeline/xpipeline",
"/processor",
Expand All @@ -98,9 +101,7 @@ var replaceModules = []string{
"/receiver/otlpreceiver",
"/receiver/receivertest",
"/receiver/xreceiver",
"/pdata",
"/pdata/testdata",
"/pdata/pprofile",
"/scraper/scraperhelper",
"/scraper",
"/semconv",
"/service",
Expand Down
Loading

0 comments on commit 73764a9

Please sign in to comment.