<!--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.
This adds the ability to generate documentation for the internal metrics
attributes.
---------
Signed-off-by: Alex Boten <223565+codeboten@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
Adds the missing dependencies into the auto generated files.
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #
https://github.com/open-telemetry/opentelemetry-collector/issues/12907
<!--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.-->
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Moving the data between same source and destination causes the
destination to be cleared.
<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes#12887
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
n/a
<!-- Issue number if applicable -->
#### Link to tracking issue
n/a
<!--Describe what testing was performed and which tests were added.-->
#### Testing
n/a
<!--Describe the documentation added.-->
#### Documentation
n/a
<!--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
This RFC will help us explore the use cases Optional types solve and
move us toward a resolution for whether to adopt these in our config.
Related to #10266
---------
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
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
<!-- Issue number if applicable -->
A second attempt at #11882.
Note that I added some tests in #12871 to prevent something like #12661
from happening again.
#### Link to tracking issue
Fixes#11749
<!--Describe what testing was performed and which tests were added.-->
#### Testing
<!--Describe the documentation added.-->
See tests from #12871 as well as the new tests added here.