Commit Graph

15 Commits

Author SHA1 Message Date
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
Pablo Baeyens a737a48402
[component] Make component.Kind a struct (#12214)
<!--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 -->
Changes the underlying type of `component.Kind` to be closer to
[`pipeline.Signal`](https://pkg.go.dev/go.opentelemetry.io/collector/pipeline#Signal).
Right now the type is defined within `component`, but it could be moved
to an internal module so that we could have a different module exposing
other value on this enum.

This is already doable today, the only thing this PR gives us is 
1. slightly more flexibility on things like making the concept of kind
more complex (e.g. adding an adjective to a kind).
2. restricting external consumers from implementing their own component
kinds without our explicit approval (with some kind of API we design)

I am not convinced this is _necessary_ to do, but we may as well do it.

This is technically a breaking change since `component.Kind(42)` was a
valid expression and it no longer is. I think this is extremely rare, so
I suggest if we go ahead we do so in one go.

#### Link to tracking issue
Fixes #11443
2025-01-31 10:46:36 +00:00
Alex Boten 164c28a60e
update time period before removing an unmaintained component (#11664)
After reviewing the 6 month period, the period seems too long to get
feedback on whether an unmaintained component should be removed. I'm
proposing shortening it to 3 months.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-11-13 09:38:22 -08:00
Bogdan Drutu 98975742d6
Add UnmarshalText for StabilityLevel (#11520)
This PR also starts using the fact that StabilityLevel implements
UnmarshalText and cleans up the mdatagen stability structure.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-23 10:18:14 -07:00
Bogdan Drutu 57e59d192f
[chore] Add tests for Stability LogMessage, small nit in switch (#11522)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-23 08:01:24 -07:00
Bogdan Drutu df8aaaec98
Fix connector logger zap kind key (#8878)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-11-13 21:40:15 -08:00
Alex Boten 80d704deb4
[chore] use license shortform (#7694)
* [chore] use license shortform

To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052

Signed-off-by: Alex Boten <aboten@lightstep.com>

* make goporto

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-18 13:11:17 -07:00
Bogdan Drutu 1bfb1804fb
Continue to disallow directly implementing Factories, but allow it for component.Factory (#6962)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-24 09:50:47 -08:00
Dmitrii Anoshin 4bb55bc1fa
[component] Rename "In development" stability level to "Development" (#6561) 2022-11-16 09:48:18 -08:00
Dmitrii Anoshin 65dfc325d9
[component] Update values returned by `StabilityLevel.String` method (#6531)
This change updates values returned by `StabilityLevel.String` to be consistent with other enum types:
  - All returned strings are capitalized.
  - "Undefined" is returned only for `StabilityLevelUndefined`.
  - "" is returned for integers that are out of StabilityLevel enum range.
2022-11-15 18:13:22 -08:00
Bogdan Drutu 6c1f5e7f72
Remove use of unnecessary internal interface in factory (#4920)
* Remove use of unnecessary internal interface in factory

This PR does not change the design (which is to not allow external implementation),
but simplifies the way how this is achieved, now that the helpers are in the same package.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Use baseFactory to implement Type() func

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-25 09:55:09 -08:00
Bogdan Drutu 23c65692be
Remove empty test file (#3199)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-17 09:24:00 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Tigran Najaryan 91728bc8ce
Make component interfaces uniform (#488)
This change fixes inconsistencies in component interfaces. Motivation:

- Uniformness results in reduction of code that currently has to
  deal with differences.
- Processor.Start is missing and is important for allowing processors
  to communicate with the Host.

What's changed:

- Introduced Component interface.
- Unified Host interface.
- Added a Start function to processors (via Component interface).
- Start/Shutdown is now called for Processors from service start/shutdown.
- Receivers, Exporters, Processors, Extensions now embed Component interface.
- Replaced StartTraceReception/StartMetricsReception by single Start function for receivers.
- Replaced StopTraceReception/StopMetricsReception by single Shutdown function for receivers.

Note: before merging this we need to announce the change in Gitter since it
breaks existing implementations in contrib (although the fix is easy).

Resolves #477
Resolves #262
2020-01-10 08:49:34 -05:00