Commit Graph

15 Commits

Author SHA1 Message Date
Israel Blancas 4397725dff
[processor/memorylimiter] Add profiles support to memorylimiter processor (#12454)
#### Description
Add profiles support to the memorylimiter processor.

#### Link to tracking issue
Fixes #12453

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
2025-02-27 12:53:19 +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
Pablo Baeyens b844bb7146
[cmd/mdatagen] Remove level field from metrics (#12145)
<!--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 -->

Removes `level` field. This will be added back in the future once #11754
is completed.

#### Link to tracking issue

Updates #11061
2025-01-22 14:09:03 +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
Bogdan Drutu 9ea2f531f5
Remove deprecated LeveledMeter from the generated code (#11696)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-11-19 10:50:15 -08:00
Bogdan Drutu 8e522ad950
Revert public API changes in #10931, preserve logic (#11415)
This PR removes APIs that expose `configtelemetry.Level`. Internal
functionality still uses the Level, but will be soon changed to use the
new Instrument.Enabled.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-11-15 16:49:51 -08:00
Bogdan Drutu 2748e5358d
[chore] Use NopTelemetrySettings instead of mock providers (#11539)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-25 14:57:43 -07:00
Bogdan Drutu d1286186b7
Remove deprecated funcs form processorhelper.ObsReport (#11289)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-27 16:13:45 -07:00
Alex Boten ef07ea0735
[mdatagen] move ScopeName to generated_status (#10848)
This will make it available to most components, as the
generated_telemetry is only generated for components that have internal
telemetry configured. Arguably the scope name should be moved to its own
file, but i'd rather not add yet another file if possible.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-08-09 12:10:11 -07:00
Alex Boten c555005fcc
[mdatagen] only generate telemetry as needed (#10129)
This prevent unnecessary files from being generated if metadata.yaml
doesn't include any internal telemetry for a component.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-09 12:05:32 -07:00
Alex Boten ce09d9773a
[mdatagen] move telemetry into its own file (#10037)
This is in preparation for using mdatagen for component telemetry.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-04-29 12:11:55 -07:00
Dmitrii Anoshin 78692b78c3
[chore] [cmd/mdatagen] Update status.go template (#9713)
To produce the same output as mdatagen in contrib. It makes it easy to
compare the diff for the mdatagen migration.
2024-03-05 13:35:54 -08:00
Alex Boten aa764826e1
[mdatagen] produce scope name with full url (#9556)
This is part of #9494

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-02-14 07:49:56 -08:00
Pablo Baeyens 26c157e3bf
[component] Add MustNewType constructor for component.Type (#9414)
**Description:** 

- Adds `component.MustNewType` to create a type. This function panics if
the type has invalid characters. Add similar functions
`component.MustNewID` and `component.MustNewIDWithName`.
- Adds `component.Type.String` to recover the string
- Use `component.MustNewType`, `component.MustNewID`,
`component.MustNewIDWithName` and `component.Type.String` everywhere in
this codebase. To do this I changed `component.Type` into an opaque
struct and checked for compile-time errors.

Some notes:

1. All components currently on core and contrib follow this rule. This
is still breaking for other components.
2. A future PR will change this into a struct, to actually validate this
(right now you can just do `component.Type("anything")` to bypass
validation). I want to do this in two steps to avoid breaking contrib
tests: we first introduce this function, and after that we change into a
struct.

**Link to tracking Issue:** Updates #9208
2024-02-02 17:33:03 +01:00
Alex Boten dbaec76447
[chore] use mdatagen for memorylimiter processor (#9182)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-12-22 09:24:37 -08:00