Commit Graph

13 Commits

Author SHA1 Message Date
Chao Weng 6de29ce169 Add `component.Type` parameter to `NewNopSettings` And deprecate `NewNopSettingsWithType` (#12452)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add `component.Type` parameter to `NewNopSettings` And deprecate
`NewNopSettingsWithType` cc @mx-psi

<!-- Issue number if applicable -->
#### Link to tracking issue
Relevant to #12305 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
Added

<!--Please delete paragraphs that you did not use before submitting.-->
2025-02-21 11:17:45 +00:00
Pablo Baeyens a4ae175111
[*test] Add NewNopSettingsWithType everywhere (#12357)
<!--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 -->

Creates `NewNopSettingsWithType` function on test modules and deprecates
the `NewNopSettings` functions on those modules. Replace all usages of
`NewNopSettings` with `NewNopSettingsWithType`.

Part of #12305 but applied to all component kinds.

#### Link to tracking issue
Updates #12221
2025-02-13 16:56:20 +00:00
Bogdan Drutu abdfdc8d5f
[chore] Remove unused private funcs from generated code with mdatagen (#12339)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-02-11 00:25:13 +00:00
Alex Boten 7d603aa46b
Remove deprecated funcs (#12304)
Removing all v0.119.0 deprecated funcs.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2025-02-06 03:57:26 +00:00
Bogdan Drutu 0a40b4e00b
Deprecate metadatatest.Telemetry in favor of componenttest.Telemetry (#12218)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-31 21:31:34 +00:00
Bogdan Drutu d9b97ffb43
[metadatatest] Generate NewSettings that accepts componenttest.Telemetry (#12216)
This is the last functionality needed to replace
`metadatatest.Telemetry` with `componenttest.Telemetry`.

The `metadatatest.Telemetry` will be deprecated next release to give
time to change contrib since it is a large change.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-30 21:42:20 +00:00
Bogdan Drutu fb8bb93121
Add helper to get a metric for componentest.Telemetry (#12215)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-30 19:04:27 +00:00
Bogdan Drutu 3203167e9a
Make registration of callback for async metric always optional (#12204)
This PR also solves one more issues with the new interface, which is the
ability to record multiple observations for a single async metric using
one callback.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-29 23:58:43 +00:00
Chao Weng c2f1599df9
Generate assert function for each metric in mdatagen (#12179)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Completion of #12167 , cc @bogdandrutu 

Updated one test to verify the change, will update the rest ones after
this PR merges.
<!-- Issue number if applicable -->
#### Link to tracking issue
n/a

<!--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.-->
2025-01-25 16:52:04 +00:00
Bogdan Drutu 7db2f90d79
Allow passing trace/metric SDK options to componenttest.Telemetry (#12166)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-23 10:54:13 +00:00
Bogdan Drutu c6a0986813
Extract componenttest.Telemetry as generic struct for telemetry testing (#12151)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-22 20:27:45 +00:00
Chao Weng c14d4f96d6
Add tracing support in metadatatest (#12106)
#### Description
Add tracing support in metadatatest

cc @bogdandrutu  
#### Documentation
Added
2025-01-17 08:52:24 +00:00
Bogdan Drutu 306c939415
Deprecate component_test in favor of metadatatest (#11812)
The main idea behind this is that the test helpers were generated in the
main package, hard to find and understand and also impossible to use
outside the main package, see the
[service/internal/proctelemetry/process_telemetry_test.go](https://github.com/open-telemetry/opentelemetry-collector/compare/main...bogdandrutu:opentelemetry-collector:dep-comp-test?expand=1#diff-ed642eb1c968a9308a07e87292f77af1e0830a7af2d87111c5abacde4fc87446).

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-01-06 18:06:46 +00:00