The following commands were run to prepare this release:
- make chlog-update VERSION=v1.32.0/v0.126.0
- make prepare-release PREVIOUS_VERSION=1[.]31[.]0
RELEASE_CANDIDATE=1.32.0 MODSET=stable
- make prepare-release PREVIOUS_VERSION=0[.]125[.]0
RELEASE_CANDIDATE=0.126.0 MODSET=beta
---------
Co-authored-by: Dmitry Anoshin <anoshindx@gmail.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Avoid re-creating sampler counters every time we wrap with attributes.
<!-- Issue number if applicable -->
#### Link to tracking issue
Updates #13014
<!--Describe what testing was performed and which tests were added.-->
#### Testing
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
---------
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Jade Guiton <jade.guiton@datadoghq.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
This updates the stability requirements to require certain benchmarking,
testing and documentation to ensure scalability, resiliency and
performance expectations are documented at a minimum level.
To operationalize this, I will work on:
- Adding automated context propagation tests for components for which it
is easy to do so (connectors and processors)
- Adding a new section to the table with a link to the latest
benchmarking results.
#### Link to tracking issue
Fixes#11866Fixes#11868Fixes#11593
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/12856Resolves#12676
This is a reboot of #11311, incorporating metrics defined in the
[component telemetry
RFC](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/component-universal-telemetry.md)
and attributes added in #12617.
The basic pattern is:
- When building any pipeline component which produces data, wrap the
"next consumer" with instrumentation to measure the number of items
being passed. This wrapped consumer is then passed into the constructor
of the component.
- When building any pipeline component which consumes data, wrap the
component itself. This wrapped consumer is saved onto the graph node so
that it can be retrieved during graph assembly.
---------
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
If we enable `DecodeNil` as true, we may have [untyped
nils](https://go.dev/doc/faq#nil_error) being passed. Unfortunately,
these are not valid values for `reflect`, which leads to surprising
behavior such as golang/go/issues/51649.
Unfortunately, the default hooks from mapstructure do not deal with this
properly. To account for this, we:
- Vendor and change the `ComposeDecodeHookFunc` function so that this
case is accounted for the kinds of hooks that just won't work with
untyped nils
- Create a safe wrapper for the hooks that do work with untyped nils.
This wrapper is used in all hooks, but in the interest of keeping as
close to what I would imagine upstream will accept, I did not add this
to the compose function.
This should not have any end-user observable behavior.
<!-- Issue number if applicable -->
#### Link to tracking issue
Attempt to work around
https://github.com/open-telemetry/opentelemetry-collector/pull/12996#issuecomment-2862859367
---------
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
While working on #12981, I would have found it useful to have these
tests, since they surfaced a bug when enabling `DecodeNil`.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This updates the bugfix guidelines to make them less strict. In
particular, after this change, we would start releasing bugfix releases
under the following cases:
1. Lack of consensus of SIG leads on whether to release a bugfix version
within one working day after a report has been made
2. Issues that have not been reported by multiple people, but that are
known to be used in production
This also:
- Explicitly lists difficulties with debugging and troubleshooting as
'severe enough'
- Explicitly states that the release manager is responsible for bugfix
releases
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add functions for processing structured events
<!-- Issue number if applicable -->
#### Link to tracking issue
Part of #12571
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added
<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Updates release guidelines to reflect #12837
---------
Co-authored-by: Chao Weng <19381524+sincejune@users.noreply.github.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Adds wording regarding testing requirements for stable components. The
intent is for the lifecycle tests to be handled via mdatagen.
This follows the work done on
open-telemetry/opentelemetry-collector-contrib/issues/39543, with which
now we have component coverage per component.
#### Link to tracking issue
Fixes#11867
@mx-psi @dmitryax While working on my RFC, I realized that we can
simplify the logic by moving the merge behavior into `conf.Merge`.
Currently, the feature gate check happens externally, and we choose the
merge option based on that.
This PR moves the check inside `conf.Merge`. By doing this
[converters](https://github.com/open-telemetry/opentelemetry-collector/blob/main/confmap/README.md)
can also make use of this feature.
There are no changes to any API signatures, so this doesn’t introduce
any breaking changes. Let me know what you think about this.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
I accidentally checked out this file in #12871 but it should be deleted.
Woops!
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes#12964
<!--Describe what testing was performed and which tests were added.-->
#### Testing
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
---------
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
#### Description
Propagate `telemetry.resource` to the internal logs.
#### Link to tracking issue
Fixes#12582
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
#### Description
This is an alternative PR to #12825.
I'm taking all the commits from that PR and adding the feature gate on
the client side, as requested by reviews. The server behavior of peeking
into the initial bytes to identify the encoding is kept :)
If you've reviewed the previous PR, you can just review the latest
commit!
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes#10584
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Michael Graff <mgraff@cardinalhq.io>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Jonathan <perebaj@gmail.com>
Adds checkapi to the tools and a make target to run it.
Fixes#12360
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Implements new name for attribute as documented in #12951.
Note: The obsconsumer package is unused until #12812 is merged so this
is not a breaking change.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Adds a CodeCov status badge unless explicitly disabled.
I have disabled this in core until we roll this out in contrib to show
the Go SIG and move codecovgen to build tools
#### Link to tracking issue
Updates open-telemetry/opentelemetry-collector-contrib/issues/39583
Follow-up of
https://github.com/open-telemetry/opentelemetry-collector/pull/12097/
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
### Description
Ideally, users want to merge lists in pipelines only. In this PR, I'm
adding support for merging following components:
1. extensions
2. receivers
3. exporters
We make use of glob-like pattern to match the path because there can be
multiple pipelines configured. Inspired by @evan-bradley's
[idea](https://github.com/open-telemetry/opentelemetry-collector/pull/12097/#discussion_r1918620008).
I'm leaving `processors` out of this list because we make an ordering
guarantee.
#### _**Future plan:**_
Once this PR gets merged, it would make it easier for us to decide upon
the command line flags to make this option configurable over the RFC.
Right now, `patterns` is hardcoded to include above mentioned
components, but we can easily make it configurable after making some
tweaks.
<!-- Issue number if applicable -->
### Link to tracking issue
Relates
https://github.com/open-telemetry/opentelemetry-collector/issues/8754
<!--Describe what testing was performed and which tests were added.-->
### Testing
Expanded the existing test cases
<!--Describe the documentation added.-->
#### Documentation
#### Description
Extend the merge freeze logic in
`.github/workflows/scripts/check-merge-freeze.sh` to include open PRs
titled "[chore] Update core dependencies" in the
`opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib`
repository, in addition to the existing check for "[chore] Prepare
release" PRs in the core repo.
This ensures that no PRs can be merged into `main` while a core update
PR is pending in contrib, helping us avoid version drift and keep
dependencies aligned between core and contrib.
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/12830
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Tested locally by:
- Opening a dummy "[chore] Update core dependencies" PR on
`opentelemetry-collector-contrib`
- Running the updated `check-merge-freeze.sh` script to confirm it
correctly blocks merges
- Verified output message includes the contrib PR URL when such a PR is
open
<!--Describe the documentation added.-->
#### Documentation
No user-facing documentation changes needed. This change only affects
internal CI logic.
<!--Please delete paragraphs that you did not use before submitting.-->
Signed-off-by: sAchin-680 <mrmister680@gmail.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
`Equal(..)` panics when we're comparing maps. Use `reflect.DeepEqual`
instead. It behaves same way as `Equal` for types such as `int`,
`string`, `float` etc, but compares individual elements for maps as
well.
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/12932
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added a scenario
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from
0.19.0 to 0.35.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7292932d45"><code>7292932</code></a>
ssh: limit the size of the internal packet queue while waiting for
KEX</li>
<li><a
href="f66f74b0a4"><code>f66f74b</code></a>
acme/autocert: check host policy before probing the cache</li>
<li><a
href="b0784b7bfb"><code>b0784b7</code></a>
x509roots/fallback: drop obsolete build constraint</li>
<li><a
href="911360c8a4"><code>911360c</code></a>
all: bump golang.org/x/crypto dependencies of asm generators</li>
<li><a
href="89ff08d67c"><code>89ff08d</code></a>
all: upgrade go directive to at least 1.23.0 [generated]</li>
<li><a
href="e47973b1c1"><code>e47973b</code></a>
all: update certs for go1.24</li>
<li><a
href="9290511cd2"><code>9290511</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="fa5273e461"><code>fa5273e</code></a>
x509roots/fallback: update bundle</li>
<li><a
href="a8ea4be81f"><code>a8ea4be</code></a>
ssh: add ServerConfig.PreAuthConnCallback, ServerPreAuthConn (banner)
interface</li>
<li><a
href="71d3a4cfdb"><code>71d3a4c</code></a>
acme: support challenges that require the ACME client to send a
non-empty JSO...</li>
<li>Additional commits viewable in <a
href="https://github.com/golang/crypto/compare/v0.19.0...v0.35.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/open-telemetry/opentelemetry-collector/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Deprecates `configauth.Authentication` in favor of
`configauth.AuthenticationConfig`.
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes#12875
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR added type definition needed for supporting structured events in
mdatagen.
Note: the NewLogsBuilder function signature is generated dynamically
according to logs config:
```
func NewLogsBuilder({{ if .Events }}lbc LogsBuilderConfig, {{ end }}settings {{ .Status.Class }}.Settings) *LogsBuilder {}
```
<!-- Issue number if applicable -->
#### Link to tracking issue
Part of #12571
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added
<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
#### Description
golangci-lint is now able to apply suggested fixes from testifylint with
golangci-lint --fix .
This PR removes testifylint-fix target from Makefile.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
The following commands were run to prepare this release:
- make chlog-update VERSION=v1.31.0/v0.125.0
- make prepare-release PREVIOUS_VERSION=1[.]30[.]0
RELEASE_CANDIDATE=1.31.0 MODSET=stable
- make prepare-release PREVIOUS_VERSION=0[.]124[.]0
RELEASE_CANDIDATE=0.125.0 MODSET=beta
#### Description
This adds an error for when the storage extension runs out of space.
Extensions can return this error when it's not possible to store data
because the maximum allowable/possible space has been reached.
#### Link to tracking issue
Fixes#12634
#### Testing
I have been working on the filestorage extension and have a draft PR
that uses this error:
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/39667
#### Context
PR #12617 introduced logic to inject new instrumentation scope
attributes in all internal telemetry to identify which Collector
component it came from. These attributes had already been added to
internal logs as regular log attributes, and this PR switched them to
scope attributes for consistency. The new logic was placed behind an
Alpha stage feature gate, `telemetry.newPipelineTelemetry`.
Unfortunately, the default "off" state of the feature gate disabled the
injection of component-identifying attributes entirely, which was a
regression since they had been present in internal logs in previous
releases. See issue #12870 for an in-depth discussion of this issue.
To correct this, PR #12856 was filed, which stabilized the feature gate,
making it on by default, with no way to disable it, and removed the
logic that the feature gate used to toggle. This was thought to be the
simplest way to mitigate the regression in the "off" state, since we
planned to stabilize the feature eventually anyways.
Unfortunately, it was found that the "on" state of the feature gate
causes a different issue: [the Prometheus
exporter](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus)
is the default way of exporting the Collector's internal metrics,
accessible at `collector:8888/metrics`. This exporter does not currently
have any support for instrumentation scope attributes, meaning that
metric streams differentiated by said attributes but not by any other
identifying property will appear as aliases to Prometheus, which causes
an error. This completely breaks the export of Collector metrics through
Prometheus under some simple configurations, which is a release blocker.
#### Description
To fix this issue, this PR sets the `telemetry.newPipelineTelemetry`
feature gate back to "Alpha" (off by default), and reintroduces logic to
disable the injection of the new instrumentation scope attributes when
the gate is off, but only in internal metrics. Note that the new logic
is still used unconditionally for logs and traces, to avoid
reintroducing the logs issue (#12870).
This should avoid breaking the Collector in its default configuration
while we try to get a fix in the Prometheus exporter.
#### Link to tracking issue
No tracking issue currently, will probably file one later.
#### Testing
I performed some simple manual testing with a config file like the
following:
```yaml
receivers:
otlp: [...]
processors:
batch:
exporters:
debug: [...]
service:
pipelines:
logs:
receivers: [otlp]
processors: [batch]
exporters: [debug]
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug]
telemetry:
metrics:
level: detailed
traces: [...]
logs: [...]
```
The two batch processors create aliased metric streams, which are only
differentiated by the new component attributes. I checked that:
1. this config causes an error in the Prometheus exporter on main;
2. the error is resolved by default after applying this PR;
3. the error reappears when enabling the feature gate (this is expected)
4. scope attributes are added on the traces and logs no matter the state
of the gate.