Skip to content

[xscraper] add Profiles support#13915

Merged
mx-psi merged 33 commits intoopen-telemetry:mainfrom
florianl:scraper-profiles
Nov 19, 2025
Merged

[xscraper] add Profiles support#13915
mx-psi merged 33 commits intoopen-telemetry:mainfrom
florianl:scraper-profiles

Conversation

@florianl
Copy link
Member

Description

Implement scraper for Profiles.

This will help implement receiver parts like open-telemetry/opentelemetry-collector-contrib#42843.

@florianl florianl requested a review from a team as a code owner September 29, 2025 09:08
@florianl florianl requested a review from dmitryax September 29, 2025 09:08
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl florianl changed the title [scraper] add Profiles support [xscraper] add Profiles support Sep 29, 2025
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (116c181) to head (1ecee8d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13915      +/-   ##
==========================================
- Coverage   92.15%   92.12%   -0.03%     
==========================================
  Files         663      666       +3     
  Lines       41387    41438      +51     
==========================================
+ Hits        38140    38176      +36     
- Misses       2211     2221      +10     
- Partials     1036     1041       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 14, 2025
@dmathieu dmathieu removed the Stale label Oct 14, 2025
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@dmitryax dmitryax added this pull request to the merge queue Oct 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 22, 2025
@dmathieu dmathieu added the ready-to-merge Code review completed; ready to merge by maintainers label Oct 23, 2025
florianl and others added 3 commits November 6, 2025 15:54
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl
Copy link
Member Author

florianl commented Nov 6, 2025

@dmitryax or @dmathieu - can this change get merged?

florianl and others added 4 commits November 15, 2025 13:49
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@mx-psi mx-psi added this pull request to the merge queue Nov 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2025
@mx-psi
Copy link
Member

mx-psi commented Nov 19, 2025

Can you take a look at the failing tests?

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl
Copy link
Member Author

@mx-psi make tidy seemed to resole the issue.

The error now seems to be receiver/expvarreceiver and unrelated to this change:

=== Failed
ERROR rerun aborted because previous run had a suspected panic and some test may not have run
=== FAIL: . TestLoadConfig/expvar/default (0.00s)

=== FAIL: . TestLoadConfig (0.00s)
panic: cannot handle unexported field at {*expvarreceiver.Config}.ClientConfig.Cookies.value:
		"go.opentelemetry.io/collector/config/configoptional".Optional[go.opentelemetry.io/collector/config/confighttp.CookiesConfig]
	consider using cmpopts.EquateComparable to compare comparable Go types [recovered]
	panic: cannot handle unexported field at {*expvarreceiver.Config}.ClientConfig.Cookies.value:
		"go.opentelemetry.io/collector/config/configoptional".Optional[go.opentelemetry.io/collector/config/confighttp.CookiesConfig]
	consider using cmpopts.EquateComparable to compare comparable Go types

goroutine 92 [running]:
testing.tRunner.func1.2({0x14167a0, 0xc00019a450})
	/opt/hostedtoolcache/go/1.24.10/x64/src/testing/testing.go:1734 +0x3eb
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.24.10/x64/src/testing/testing.go:1737 +0x696
panic({0x14167a0?, 0xc00019a450?})
	/opt/hostedtoolcache/go/1.24.10/x64/src/runtime/panic.go:792 +0x132
github.com/google/go-cmp/cmp.validator.apply({{}}, 0xc0003b3e00, {0x14a65e0?, 0xc000152720?, 0x1?}, {0x14a65e0?, 0xc000152ea0?, 0x1efe640?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/options.go:256 +0x66e
github.com/google/go-cmp/cmp.(*state).tryOptions(0xc0003b3e00, {0x1788cd0, 0x14a65e0}, {0x14a65e0?, 0xc000152720?, 0x4bee59?}, {0x14a65e0?, 0xc000152ea0?, 0x4c0ac9?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:306 +0x13a
github.com/google/go-cmp/cmp.(*state).compareAny(0xc0003b3e00, {0x1772e90, 0xc000148d00})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:261 +0x729
github.com/google/go-cmp/cmp.(*state).compareStruct(0xc0003b3e00, {0x1788cd0, 0x151c280}, {0x151c280?, 0xc000152720?, 0x1?}, {0x151c280?, 0xc000152ea0?, 0x4c0ac9?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:414 +0xa09
github.com/google/go-cmp/cmp.(*state).compareAny(0xc0003b3e00, {0x1772e90, 0xc000148700})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:289 +0x158c
github.com/google/go-cmp/cmp.(*state).compareStruct(0xc0003b3e00, {0x1788cd0, 0x1599e80}, {0x1599e80?, 0xc000152528?, 0x0?}, {0x1599e80?, 0xc000152ca8?, 0x4c0ac9?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:414 +0xa09
github.com/google/go-cmp/cmp.(*state).compareAny(0xc0003b3e00, {0x1772e90, 0xc000148500})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:289 +0x158c
github.com/google/go-cmp/cmp.(*state).compareStruct(0xc0003b3e00, {0x1788cd0, 0x1500fe0}, {0x1500fe0?, 0xc000152508?, 0x32?}, {0x1500fe0?, 0xc000152c88?, 0x0?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:414 +0xa09
github.com/google/go-cmp/cmp.(*state).compareAny(0xc0003b3e00, {0x1772f20, 0xc00032c7c0})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:289 +0x158c
github.com/google/go-cmp/cmp.(*state).comparePtr(0xc0003b3e00, {0x1788cd0, 0x147dbe0}, {0x147dbe0?, 0xc000152508?, 0x40?}, {0x147dbe0?, 0xc000152c88?, 0x4b7c60?})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:566 +0x7ef
github.com/google/go-cmp/cmp.(*state).compareAny(0xc0003b3e00, {0x1772fb0, 0xc00032c780})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:295 +0x13d2
github.com/google/go-cmp/cmp.Diff({0x147dbe0, 0xc000152508}, {0x147dbe0, 0xc000152c88}, {0xc0002284e0, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/google/go-cmp@v0.7.0/cmp/compare.go:122 +0xc7
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver.TestLoadConfig.func1(0xc000185a40)
	/tmp/contrib/receiver/expvarreceiver/config_test.go:88 +0x445
testing.tRunner(0xc000185a40, 0xc0000be820)
	/opt/hostedtoolcache/go/1.24.10/x64/src/testing/testing.go:1792 +0x226
created by testing.(*T).Run in goroutine 3
	/opt/hostedtoolcache/go/1.24.10/x64/src/testing/testing.go:1851 +0x8f3

DONE 24 tests, 2 failures in 1.066s
make[3]: *** [../../Makefile.Common:121: test] Error 3
make[2]: *** [Makefile:254: receiver/expvarreceiver] Error 2
make[1]: *** [Makefile:175: gotest] Error 2
make: *** [Makefile:214: check-contrib] Error 2

@mx-psi mx-psi added this pull request to the merge queue Nov 19, 2025
Merged via the queue into open-telemetry:main with commit 716e11a Nov 19, 2025
60 of 61 checks passed
atoulme pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Jan 14, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

After `convertPprofToPprofile()` implement also
`convertPprofileToPprof()`.

Once
open-telemetry/opentelemetry-collector#13915 and
this PR got merged, we can start a pprof to OTel profiles and vice versa
conversion.

Ping @open-telemetry/profiling-approvers 


<!-- Issue number (e.g. #1234) or full URL to issue, 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: Florian Lehner <florian.lehner@elastic.co>
Co-authored-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
TimoBehrendt pushed a commit to TimoBehrendt/tracebasedlogsampler that referenced this pull request Feb 9, 2026
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [go.opentelemetry.io/collector/component](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.45.0` → `v1.50.0` | `v1.51.0` |
| [go.opentelemetry.io/collector/component/componenttest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.139.0` → `v0.144.0` | `v0.145.0` |
| [go.opentelemetry.io/collector/confmap](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.45.0` → `v1.50.0` | `v1.51.0` |
| [go.opentelemetry.io/collector/consumer](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.45.0` → `v1.50.0` | `v1.51.0` |
| [go.opentelemetry.io/collector/consumer/consumertest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.139.0` → `v0.144.0` | `v0.145.0` |
| [go.opentelemetry.io/collector/pdata](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.45.0` → `v1.50.0` | `v1.51.0` |
| [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.45.0` → `v1.50.0` | `v1.51.0` |
| [go.opentelemetry.io/collector/processor/processortest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.139.0` → `v0.144.0` | `v0.145.0` |
| [go.uber.org/zap](https://github.com/uber-go/zap) | require | patch | `v1.27.0` → `v1.27.1` |  |

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/component)</summary>

### [`v1.50.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1500v01440)

##### 🛑 Breaking changes 🛑

- `pkg/exporterhelper`: Change verbosity level for otelcol\_exporter\_queue\_batch\_send\_size metric to detailed. ([#&#8203;14278](open-telemetry/opentelemetry-collector#14278))
- `pkg/service`: Remove deprecated `telemetry.disableHighCardinalityMetrics` feature gate. ([#&#8203;14373](open-telemetry/opentelemetry-collector#14373))
- `pkg/service`: Remove deprecated `service.noopTracerProvider` feature gate. ([#&#8203;14374](open-telemetry/opentelemetry-collector#14374))

##### 🚩 Deprecations 🚩

- `exporter/otlp_grpc`: Rename `otlp` exporter to `otlp_grpc` exporter and add deprecated alias `otlp`. ([#&#8203;14403](open-telemetry/opentelemetry-collector#14403))
- `exporter/otlp_http`: Rename `otlphttp` exporter to `otlp_http` exporter and add deprecated alias `otlphttp`. ([#&#8203;14396](open-telemetry/opentelemetry-collector#14396))

##### 💡 Enhancements 💡

- `cmd/builder`: Avoid duplicate CLI error logging in generated collector binaries by relying on cobra's error handling. ([#&#8203;14317](open-telemetry/opentelemetry-collector#14317))

- `cmd/mdatagen`: Add the ability to disable attributes at the metric level and re-aggregate data points based off of these new dimensions ([#&#8203;10726](open-telemetry/opentelemetry-collector#10726))

- `cmd/mdatagen`: Add optional `display_name` and `description` fields to metadata.yaml for human-readable component names ([#&#8203;14114](open-telemetry/opentelemetry-collector#14114))
  The `display_name` field allows components to specify a human-readable name in metadata.yaml.
  When provided, this name is used as the title in generated README files.
  The `description` field allows components to include a brief description in generated README files.

- `cmd/mdatagen`: Validate stability level for entities ([#&#8203;14425](open-telemetry/opentelemetry-collector#14425))

- `pkg/xexporterhelper`: Reenable batching for profiles ([#&#8203;14313](open-telemetry/opentelemetry-collector#14313))

- `receiver/nop`: add profiles signal support ([#&#8203;14253](open-telemetry/opentelemetry-collector#14253))

##### 🧰 Bug fixes 🧰

- `pkg/exporterhelper`: Fix reference count bug in partition batcher ([#&#8203;14444](open-telemetry/opentelemetry-collector#14444))

<!-- previous-version -->

### [`v1.49.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1490v01430)

##### 💡 Enhancements 💡

- `all`: Update semconv import to 1.38.0 ([#&#8203;14305](open-telemetry/opentelemetry-collector#14305))
- `exporter/nop`: Add profiles support to nop exporter ([#&#8203;14331](open-telemetry/opentelemetry-collector#14331))
- `pkg/pdata`: Optimize the size and pointer bytes for pdata structs ([#&#8203;14339](open-telemetry/opentelemetry-collector#14339))
- `pkg/pdata`: Avoid using interfaces/oneof like style for optional fields ([#&#8203;14333](open-telemetry/opentelemetry-collector#14333))

<!-- previous-version -->

### [`v1.48.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1480v01420)

##### 💡 Enhancements 💡

- `exporter/debug`: Add logging of dropped attributes, events, and links counts in detailed verbosity ([#&#8203;14202](open-telemetry/opentelemetry-collector#14202))

- `extension/memory_limiter`: The memorylimiter extension can be used as an HTTP/GRPC middleware. ([#&#8203;14081](open-telemetry/opentelemetry-collector#14081))

- `pkg/config/configgrpc`: Statically validate gRPC endpoint ([#&#8203;10451](open-telemetry/opentelemetry-collector#10451))
  This validation was already done in the OTLP exporter. It will now be applied to any gRPC client.

- `pkg/service`: Add support to disabling adding resource attributes as zap fields in internal logging ([#&#8203;13869](open-telemetry/opentelemetry-collector#13869))
  Note that this does not affect logs exported through OTLP.

<!-- previous-version -->

### [`v1.47.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1470v01410)

##### 🛑 Breaking changes 🛑

- `pkg/config/confighttp`: Use configoptional.Optional for confighttp.ClientConfig.Cookies field ([#&#8203;14021](open-telemetry/opentelemetry-collector#14021))

##### 💡 Enhancements 💡

- `pkg/config/confighttp`: Setting `compression_algorithms` to an empty list now disables automatic decompression, ignoring Content-Encoding ([#&#8203;14131](open-telemetry/opentelemetry-collector#14131))
- `pkg/service`: Update semantic conventions from internal telemetry to v1.37.0 ([#&#8203;14232](open-telemetry/opentelemetry-collector#14232))
- `pkg/xscraper`: Implement xscraper for Profiles. ([#&#8203;13915](open-telemetry/opentelemetry-collector#13915))

##### 🧰 Bug fixes 🧰

- `pkg/config/configoptional`: Ensure that configoptional.None values resulting from unmarshaling are equivalent to configoptional.Optional zero value. ([#&#8203;14218](open-telemetry/opentelemetry-collector#14218))

<!-- previous-version -->

### [`v1.46.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1460v01400)

##### 💡 Enhancements 💡

- `cmd/mdatagen`: `metadata.yaml` now supports an optional `entities` section to organize resource attributes into logical entities with identity and description attributes ([#&#8203;14051](open-telemetry/opentelemetry-collector#14051))
  When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder
  that associate resources with entity types using the entity refs API. The entities section is backward
  compatible - existing metadata.yaml files without entities continue to work as before.

- `cmd/mdatagen`: Add semconv reference for metrics ([#&#8203;13920](open-telemetry/opentelemetry-collector#13920))

- `connector/forward`: Add support for Profiles to Profiles ([#&#8203;14092](open-telemetry/opentelemetry-collector#14092))

- `exporter/debug`: Disable sending queue by default ([#&#8203;14138](open-telemetry/opentelemetry-collector#14138))
  The recently added sending queue configuration in Debug exporter was enabled by default and had a problematic default size of 1.
  This change disables the sending queue by default.
  Users can enable and configure the sending queue if needed.

- `pkg/config/configoptional`: Mark `configoptional.AddEnabledField` as beta ([#&#8203;14021](open-telemetry/opentelemetry-collector#14021))

- `pkg/otelcol`: This feature has been improved and tested; secure-by-default redacts configopaque values ([#&#8203;12369](open-telemetry/opentelemetry-collector#12369))

##### 🧰 Bug fixes 🧰

- `all`: Ensure service service.instance.id is the same for all the signals when it is autogenerated. ([#&#8203;14140](open-telemetry/opentelemetry-collector#14140))

<!-- previous-version -->

</details>

<details>
<summary>uber-go/zap (go.uber.org/zap)</summary>

### [`v1.27.1`](https://github.com/uber-go/zap/releases/tag/v1.27.1)

[Compare Source](uber-go/zap@v1.27.0...v1.27.1)

Enhancements:

- [#&#8203;1501][]: prevent `Object` from panicking on nils
- [#&#8203;1511][]: Fix a race condition in `WithLazy`.

Thanks to [@&#8203;rabbbit](https://github.com/rabbbit), [@&#8203;alshopov](https://github.com/alshopov), [@&#8203;jquirke](https://github.com/jquirke), [@&#8203;arukiidou](https://github.com/arukiidou) for their contributions to this release.

[#&#8203;1501]: uber-go/zap#1501

[#&#8203;1511]: uber-go/zap#1511

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), 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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

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

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMC41IiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://gitea.t000-n.de/t.behrendt/tracebasedlogsampler/pulls/25
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants