Commit Graph

1771 Commits

Author SHA1 Message Date
Tyler Helmuth 1ad6912e6c
[chore] Prepare release v1.29.0/v0.123.0 (#12773)
The following commands were run to prepare this release:

make chlog-update VERSION=v1.29.0/v0.123.0
make prepare-release PREVIOUS_VERSION=1.28.1 RELEASE_CANDIDATE=1.29.0
MODSET=stable
make prepare-release PREVIOUS_VERSION=0.122.1 RELEASE_CANDIDATE=0.123.0
MODSET=beta
2025-03-31 18:44:04 +00:00
Dmitrii Anoshin 7ece16596d
Deprecate the old exporter batch configuration section (#12772) 2025-03-31 17:23:57 +00:00
Dmitrii Anoshin 09abeee6aa
[chore] Update exporter helper config documentation (#12770) 2025-03-31 16:46:26 +00:00
Dmitrii Anoshin 741985bcc3
[chore] Mark the new batcher config as mutating as well (#12766)
No changelog needed since it's not released yet
2025-03-31 05:02:40 +00:00
Bogdan Drutu 68e964a2f1
[chore] Enforce to use items sizer for deprecated WithBatcher (#12764)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-31 03:54:57 +00:00
Bogdan Drutu c56d8f6bee
[chore] Use T for generics instead of K, consistent with rest of the repo (#12755)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-28 16:33:24 +00:00
Pablo Baeyens 38fe4dbed7
[chore] Bump pseudoversions for processor and exporter modules (#12758)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Fixes open-telemetry/opentelemetry-collector-contrib#38850
2025-03-28 16:10:22 +00:00
Jade Guiton 54c13a9217
Inject component-identifying scope attributes (#12617)
#### Description

Fork of #12384 to showcase how component attributes can be injected into
scope attributes instead of log/metric/span attributes. See that PR for
more context.

To see the diff from the previous PR, filter changes starting from the
"Prototype using scope attributes" commit.

#### Link to tracking issue
Resolves #12217 
Also incidentally resolves #12213 and resolves #12117

#### Testing
I updated the existing tests to check for scope attributes, and did some
manual testing with a debug exporter to check that the scope attributes
are added/removed properly.

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
2025-03-28 12:15:25 +00:00
Bogdan Drutu 51c36591ef
Enable support to do batching using bytes sizer (#12751)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-28 05:42:54 +00:00
Dmitrii Anoshin 45d3af73df
[chore] Fix a comment for exporterhelper.NewDefaultQueueConfig (#12754) 2025-03-28 05:22:07 +00:00
Alex Boten bf9fa311fa
[chore] update tests to use Empty (#12750)
This change was caught by the linter in the update of golangci-lint to
v2 (see
https://github.com/open-telemetry/opentelemetry-collector/pull/12731)

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2025-03-27 20:52:18 +00:00
Bogdan Drutu f9197adbcc
Deprecate SizeConfig as well from exporterhelper (#12749)
I forgot about this in the previous PR.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-27 18:21:45 +00:00
Bogdan Drutu 40cb5307e8
Deprecate BatcherConfig and WithBatcher in favor of the new QueueBatchConfig (#12748)
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2025-03-27 03:54:55 +00:00
Bogdan Drutu f09817e056
Add batching capability to the old QueueConfig (#12746)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-26 23:56:07 +00:00
Bogdan Drutu ea0a4c60c4
[chore] Use int64 for queue_size in the queuebatch.Config, simplifies conversions (#12745)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-26 20:49:20 +00:00
Bogdan Drutu 450a4cee3b
[chore] Add ability to configure sizer for default batcher (#12744)
This functionality is not yet exposed to the users, in next PRs will be.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-26 20:47:57 +00:00
Bogdan Drutu 540d6ed2f7
Add support for `wait_for_result`, remove disabled_queue (#12742)
In this PR, we merge the functionality from "disabled_queue" within the
memory queue. For the moment this functionality is not available for the
persistent queue.

In the next PR, will merge the `internal.QueueConfig` with
`queuebatch.Config`.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-26 19:54:21 +00:00
renovate[bot] 3059a34d9d
Update module google.golang.org/protobuf to v1.36.6 (#12728)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[google.golang.org/protobuf](https://redirect.github.com/protocolbuffers/protobuf-go)
| `v1.36.5` -> `v1.36.6` |
[![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fprotobuf/v1.36.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fprotobuf/v1.36.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fprotobuf/v1.36.5/v1.36.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fprotobuf/v1.36.5/v1.36.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>protocolbuffers/protobuf-go
(google.golang.org/protobuf)</summary>

###
[`v1.36.6`](https://redirect.github.com/protocolbuffers/protobuf-go/releases/tag/v1.36.6)

[Compare
Source](https://redirect.github.com/protocolbuffers/protobuf-go/compare/v1.36.5...v1.36.6)

**Full Changelog**:
https://github.com/protocolbuffers/protobuf-go/compare/v1.36.5...v1.36.6

User-visible changes:
[CL/657895](https://go-review.googlesource.com/c/protobuf/+/657895):
internal_gengo: generate a const string literal for the raw descriptor
[CL/653536](https://go-review.googlesource.com/c/protobuf/+/653536):
proto: Add CloneOf\[M Message]\(m M) M

Maintenance:
[CL/649135](https://go-review.googlesource.com/c/protobuf/+/649135):
all: set Go language version to Go 1.22
[CL/654955](https://go-review.googlesource.com/c/protobuf/+/654955):
types/descriptorpb: regenerate using latest protobuf v30 release

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
2025-03-25 02:59:55 +00:00
Bogdan Drutu 7275cddada
Deprecate blocking in favor of block_on_overflow (#12710)
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/12706

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-25 00:05:45 +00:00
Bogdan Drutu 7c2c26dcd9
Allow users to configure different sizers for memory queue (#12708)
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/12706

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-24 23:12:11 +00:00
Bogdan Drutu 58370e5b6c
Avoid using go embedded messages in Config (#12718)
This PR:
* Helps with
https://github.com/open-telemetry/opentelemetry-collector/issues/12709,
to avoid the situation where we need to add Unmarshal for a struct and
if used as embedded will not work.
* Helps with avoiding name conflicts between variables. Will allow for
example to have a "Timeout" member in both QueueConfig and ClientConfig,
even though that was a valid YAML config since `QueueConfig` is under
"seding_queue".
* This is a breaking change only if devs are created manually the OTLP
configs which should be very rare, and unfortunately this is hard to do
using deprecation steps.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-24 20:51:26 +00:00
Bogdan Drutu abcee1f50f
Deprecated everything in exporterbatcher, alias from exporterhelper (#12707)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-24 19:54:06 +00:00
Bogdan Drutu 2bc783c7d3
Deprecated everything in exporterqueue, alias from exporterhelper (#12706)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-24 18:49:07 +00:00
Bogdan Drutu 622ce90d91
[chore] Change QueueBatch implementation to use the final config (#12705)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-24 16:24:52 +00:00
Bogdan Drutu 761cca531d
[chore] Start merging queue and batcher (#12703)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-23 20:26:24 +00:00
Bogdan Drutu e5bbc40f78
[chore] Move queue-batch from internal to internal/queuebatch (#12698)
<!--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 #

<!--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>
2025-03-22 21:14:35 +00:00
Bogdan Drutu 8b79707302
[chore] Allow to configure available sizers in the queuebatch Settings (#12696)
Users cannot yet configure which sizer to use, so not yet a changelog
entry for this.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-22 19:15:16 +00:00
Bogdan Drutu ee0f0ae66d
[chore] Move batcher to the new QueueBatcher package (#12693)
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/12689

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 20:15:40 +00:00
Bogdan Drutu 0843f2d7cf
[chore] Extract the QueueBatch logic from the old QueueSender (#12690)
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/12689

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 19:12:33 +00:00
Bogdan Drutu f1bdeb3c43
[chore] Make internal Batcher interface generic (#12689)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 17:20:57 +00:00
Bogdan Drutu 562aedc665
[chore] Remove the stabilized featuregate exporter.UsePullingBasedExporterQueueBatcher (#12691)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 11:06:28 +00:00
Bogdan Drutu 65d2fabc14
[chore] Remove duplicate MockHost, add constructor (#12688)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 05:39:22 +00:00
Bogdan Drutu eb876d32ef
[chore] Move internal Sender to an internal/sender package to be re-used (#12687)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-21 05:39:06 +00:00
Bogdan Drutu 57f059bf26
Remove deprecated func types from exporterhelper (#12686)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-20 20:24:54 +00:00
Bogdan Drutu 51a478605a
[chore] Move test only MockHost in a hosttest package (#12685)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-20 19:02:52 +00:00
Yuri Sa e0a1f2163b
[chore] Added spell check (#12671)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Added the cspell to check spelling in .md, .yaml files. 

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #9287 

<!--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: Yuri Oliveira <yurimsa@gmail.com>
2025-03-20 18:53:25 +00:00
Bogdan Drutu c0c0620ce2
Remove deprecated fields from batch config (#12684)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-20 18:51:00 +00:00
Bogdan Drutu 6e64a27421
[chore] Move exporter/internal to exporterhelper/internal when possible (#12683)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-20 16:08:31 +00:00
Bogdan Drutu 6aad9d10e4
Move Queue to internal, don't expect other implementations (#12680)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-20 13:34:18 +00:00
Bogdan Drutu 12dd09fc2a
Deprecate exportehelper WithRequestQueue in favor of WithQueueBatch (#12679)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-19 23:02:29 +00:00
Bogdan Drutu 54222b60c0
Define the final stable config for QueueBatch component (#12660)
Add this as a separate config than exporterqueue.Config until the queue
and batcher are changed to support this new config. Once approved, will
merge and in sub-sequent PRs will change the components to accept this
new config and expose it to the users.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-19 16:33:29 +00:00
Evan Bradley a17839e865
[chore] Prepare release v1.28.1/v0.122.1 (#12665)
The following commands were run to prepare this release:

* make chlog-update VERSION=v1.28.1/v0.122.1
* make prepare-release PREVIOUS_VERSION=1[.]28[.]0
RELEASE_CANDIDATE=1.28.1 MODSET=stable
* make prepare-release PREVIOUS_VERSION=0[.]122[.]0
RELEASE_CANDIDATE=0.122.1 MODSET=beta

---------

Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
2025-03-18 13:57:04 -07:00
OpenTelemetry Bot 8bc15fd4d7
[chore] Prepare release v1.28.0/v0.122.0 (#12650)
The following commands were run to prepare this release:
- make chlog-update VERSION=v1.28.0/v0.122.0
- make prepare-release PREVIOUS_VERSION=1[.]27[.]0
RELEASE_CANDIDATE=1.28.0 MODSET=stable
- make prepare-release PREVIOUS_VERSION=0[.]121[.]0
RELEASE_CANDIDATE=0.122.0 MODSET=beta
2025-03-17 21:38:50 +00:00
Bogdan Drutu f09dad4a31
[chore] Small nit for variable declaration in default batcher (#12642)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-17 14:55:49 +00:00
Bogdan Drutu 83e4ea0ba3
Finish implementation of the SizerType, still restrict to only Items support (#12643)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-17 13:38:02 +00:00
Bogdan Drutu da4512d625
Replace exporterhelper Request.Export with passing a ConsumeRequest func (#12637)
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/8950

The logic behind this, is that during merging and splitting we should
not care about the export func (see complicated logic removed in
FakeRequest of in the pdata requests implementations).

Also, this simplify what user should carry with the request.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-16 22:20:41 +00:00
Mauri de Souza Meneguzzo e4c4d2fb46
pdata: add iterator All method to slice and map types (#12380)
#### Description

This PR adds support for iterators to Slice and Map types and their
autogenerated counterparts. Iterators were stabilized in Go 1.23.

The All method is analogous to [maps.All](https://pkg.go.dev/maps#All)
and [slices.All ](https://pkg.go.dev/slices#All) and is a more idiomatic
alternative to the more verbose `for i := 0; i < es.Len(); i++ { z :=
es.At(i) }` way of looping.

Code that is written like this today:

```go
for i := 0; i < ld.ResourceLogs().Len(); i++ {
        rl := ld.ResourceLogs().At(i)
        for j := 0; j < rl.ScopeLogs().Len(); j++ {
                sl := rl.ScopeLogs().At(j)
                for k := 0; k < sl.LogRecords().Len(); k++ {
                        lr := sl.LogRecords().At(k)
                        // use lr
                }
        }
}
```

Can now be written like this:

```go
for _, rl := range ld.ResourceLogs().All() {
        for _, sl := range rl.ScopeLogs().All() {
                for _, lr := range sl.LogRecords().All() {
                        // use lr
                }
        }
}
```

#### Link to tracking issue

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/11982
2025-03-14 08:55:02 +00:00
Israel Blancas 9204a0622d
Bytes based batching for traces (#12519)
#### Description

This PR implements serialized bytes based batching for traces.

#### Link to tracking issue

https://github.com/open-telemetry/opentelemetry-collector/issues/3262

Continuation of #12299 made by @sfc-gh-sili.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
2025-03-13 18:15:56 +00:00
Bogdan Drutu 7de87c93a5
Deprecate per signal converter in favor of generic version (#12631)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-13 16:46:10 +00:00
Bogdan Drutu 7ec72468f6
[chore] Fix: HTTP Proxy bypass using IPv6 Zone IDs in golang.org/x/net (#12630)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-03-13 16:16:36 +00:00