Skip to content

Commit

Permalink
Merge branch 'main' into codeboten/graduate-pkgs-confignet
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten authored Feb 8, 2024
2 parents c1fcd53 + 9553bfe commit 770eaf1
Show file tree
Hide file tree
Showing 334 changed files with 5,217 additions and 15,676 deletions.
2 changes: 1 addition & 1 deletion .chloggen/TEMPLATE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ subtext:
# 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: []
change_logs: []
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
change_type: enhancement

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Add `component.UseLocalHostAsDefaultHost` feature gate that changes default endpoints from 0.0.0.0 to localhost"
note: Validate `max_elapsed_time`, ensure it is larger than `max_interval` and `initial_interval` respectively.

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

# (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: |
The only component in this repository affected by this is the OTLP receiver.
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: []

change_logs: []
20 changes: 0 additions & 20 deletions .chloggen/depcomponent.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate `ToListener` function in favor of `ToListenerContext`
note: Remove deprecated `configcompression` types, constants and methods.

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

# (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.
Expand All @@ -22,4 +22,4 @@ subtext:
# 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]
change_logs: [api]
26 changes: 0 additions & 26 deletions .chloggen/mx-psi_featuregate-localhost.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: fix opencensus bridge configuration in periodic readers
note: Add support for json content encoding when exporting telemetry

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

# (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.
Expand All @@ -22,4 +22,4 @@ subtext:
# 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: []
change_logs: []
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
change_type: breaking

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated `DialContext` and `ListenContext` functions
note: Remove deprecated `confmap.WithErrorUnused`

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

# (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.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/stabilization.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: 'stabilization'
assignees: ''
---

Before stabilizing a module, an approver or maintainer must make sure that the following criteria have been met for at least two successive minor version releases:
Before stabilizing a module, an approver or maintainer must make sure that the following criteria have been met for at least two successive minor version releases (regardless of when this issue was opened):

- [ ] No open issues or PRs in the module that would require breaking changes
- [ ] No TODOs in the module code that would require breaking changes
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 @@ -137,7 +137,7 @@ jobs:
unittest-matrix:
strategy:
matrix:
go-version: ["~1.21.5", "~1.20.12"] # 1.20 needs quotes otherwise it's interpreted as 1.2
go-version: ["~1.22", "~1.21.5", "~1.20.12"] # 1.20 needs quotes otherwise it's interpreted as 1.2
runs-on: ubuntu-latest
needs: [setup-environment]
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/autobuild@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
39 changes: 36 additions & 3 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,26 @@ permissions:
contents: read

jobs:
contrib_tests:
contrib-tests-matrix:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}

strategy:
matrix:
group:
- receiver-0
- receiver-1
- receiver-2
- receiver-3
- processor
- exporter-0
- exporter-1
- extension
- connector
- internal
- pkg
- cmd-0
- cmd-1
- other
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -32,4 +48,21 @@ jobs:
run: |
contrib_path=/tmp/opentelemetry-collector-contrib
git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git $contrib_path
make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true check-contrib
make CONTRIB_PATH=$contrib_path SKIP_RESTORE_CONTRIB=true GROUP=${{ matrix.group }} check-contrib
contrib_tests:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Skip Contrib Tests') }}
needs: [ contrib-tests-matrix ]
steps:
- name: Print result
run: echo ${{ needs.contrib-tests-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.contrib-tests-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -56,14 +56,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
uses: github/codeql-action/upload-sarif@2f93e4319b2f04a2efc38fa7f78bd681bc3f7b2f # v2.23.2
with:
sarif_file: results.sarif
46 changes: 46 additions & 0 deletions CHANGELOG-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,52 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG

<!-- next version -->

## v1.1.0/v0.94.0

### πŸ›‘ Breaking changes πŸ›‘

- `confignet`: Remove deprecated `DialContext` and `ListenContext` functions (#9363)
- `confmap/converter/expandconverter`: Add `confmap.ConverterSettings` argument to experimental `expandconverter.New` function. (#5615, #9162)
- The `confmap.ConverterSettings` struct currently has no fields. It will be used to pass a logger.

- `component`: Remove deprecated funcs and types (#9283)
- `otlpexporter`: Config struct is moving from embedding the deprecated GRPCClientSettings struct to using ClientConfig instead. (#6767)
- `otlphttpexporter`: otlphttpexporter.Config embeds the struct confighttp.ClientConfig instead of confighttp.HTTPClientSettings (#6767)
- `otlpreceiver`: HTTPConfig struct is moving from embedding the deprecated ServerSettings struct to using HTTPServerConfig instead. (#6767)
- `component`: Validate component.Type at creation and unmarshaling time. (#9208)
- A component.Type must start with an ASCII alphabetic character and can only contain ASCII alphanumeric characters and '_'.


### 🚩 Deprecations 🚩

- `configcompressions`: Deprecate `IsCompressed`. Use `CompressionType.IsCompressed instead` instead. (#9435)
- `configcompression`: Deprecate `CompressionType`, use `Type` instead. (#9416)
- `confighttp`: Deprecate CORSSettings, use CORSConfig instead (#6767)
- `configgrpc`: Deprecate `ToListener` function in favor of `ToListenerContext` (#9389)
- `configgrpc`: Deprecate GRPCServerSettings, use ServerConfig instead (#6767)
- `confighttp`: Deprecate HTTPClientSettings, use ClientConfig instead (#6767)
- `confighttp`: Deprecate HTTPServerSettings, use ServerConfig instead (#6767)
- `confmap/provider`: Deprecate <provider>.New in favor of <provider>.NewWithSettings for all core providers (#5615, #9162)
- NewWithSettings now takes an empty confmap.ProviderSettings struct. This will be used to pass a logger in the future.


### πŸ’‘ Enhancements πŸ’‘

- `exporter/exporterhelper`: Add API for enabling queue in the new exporter helpers. (#7874)
The following experimental API is introduced in exporter package:
- `exporterhelper.WithRequestQueue`: a new exporter helper option for using a queue.
- `exporterqueue.Queue`: an interface for queue implementations.
- `exporterqueue.Factory`: a queue factory interface, implementations of this interface are intended to be used with WithRequestQueue option.
- `exporterqueue.Settings`: queue factory settings.
- `exporterqueue.Config`: common configuration for queue implementations.
- `exporterqueue.NewDefaultConfig`: a function for creating a default queue configuration.
- `exporterqueue.NewMemoryQueueFactory`: a new factory for creating a memory queue.
- `exporterqueue.NewPersistentQueueFactory: a factory for creating a persistent queue.

- `featuregate`: Add the `featuregate.ErrAlreadyRegistered` error, which is returned by `featuregate.Registry`'s `Register` when adding a feature gate that is already registered. (#8622)
Use `errors.Is` to check for this error.


## v0.93.0

### πŸ›‘ Breaking changes πŸ›‘
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./

<!-- next version -->

## v1.1.0/v0.94.0

### πŸ›‘ Breaking changes πŸ›‘

- `receiver/otlp`: Update gRPC code from `codes.InvalidArgument` to `codes.Internal` when a permanent error doesn't contain a gRPC status (#9415)

### 🚩 Deprecations 🚩

- `configgrpc`: Deprecate GRPCClientSettings, use ClientConfig instead (#6767)

### πŸ’‘ Enhancements πŸ’‘

- `mdatagen`: Add a generated test that checks the config struct using `componenttest.CheckConfigStruct` (#9438)
- `component`: Add `component.UseLocalHostAsDefaultHost` feature gate that changes default endpoints from 0.0.0.0 to localhost (#8510)
The only component in this repository affected by this is the OTLP receiver.

- `confighttp`: Add support of Host header (#9395)
- `mdatagen`: Remove use of ReportFatalError in generated tests (#9439)

### 🧰 Bug fixes 🧰

- `service`: fix opencensus bridge configuration in periodic readers (#9361)
- `otlpreceiver`: Fix goroutine leak when GRPC server is started but HTTP server is unsuccessful (#9165)
- `otlpexporter`: PartialSuccess is treated as success, logged as warning. (#9243)

## v0.93.0

### πŸ›‘ Breaking changes πŸ›‘
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,20 @@ To keep naming patterns consistent across the project, naming patterns are enfor
- `func CreateTracesExport(...) {...}`
- `func CreateTracesToTracesFunc(...) {...}`

### Enumerations

To keep naming patterns consistent across the project, enumeration patterns are enforced to make intent clear:

- Enumerations should be defined using a type definition, such as `type Level int32`.
- Enumerations should use either `int` or `string` as the underlying type
- Enumeration name should succinctly describe the enumeration's purpose
- If the package name represents the entity described by the enumeration then the package name should be factored into the name of the enumeration. For example, `component.Type` instead of `component.ComponentType`.
- The name should convey a sense of limited categorization. For example, `pcommon.ValueType` is better than `pcommon.Value` and `component.Kind` is better than `component.KindType`, since `Kind` already conveys categorization.
- Constant values of an enumeration should be prefixed with the enumeration type name in the name:
- `pcommon.ValueTypeStr` for `pcommon.ValueType`
- `pmetric.MetricTypeGauge` for `pmetric.MetricType`


### Recommended Libraries / Defaults

In order to simplify developing within the project, library recommendations have been set
Expand Down
Loading

0 comments on commit 770eaf1

Please sign in to comment.