Commit Graph

12 Commits

Author SHA1 Message Date
Tyler Helmuth c3a1129765
Deprecate component.Host.GetFactory (#10709)
#### Description
This PR deprecates the `component.Host.GetFactory` interface. This has
the benefit of keeping the `component.Host` interface as simple as
possible. Components that were relying on this method can instead check
if the underlying `component.Host` implementation supports the
interface. An example of this pattern can be found here:
91f13c309d/extension/zpagesextension/zpagesextension.go (L58-L66)

#### Link to tracking issue
Related to
https://github.com/open-telemetry/opentelemetry-collector/issues/9511
2024-07-26 10:50:34 -07:00
Tyler Helmuth 6611edfa5a
Remove `GetExporters` from component.Host (#9987)
**Description:** 
Remove the deprecated `GetExporters` function from `component.Host`

**Link to tracking Issue:** <Issue number if applicable>

Related to
https://github.com/open-telemetry/opentelemetry-collector/issues/7370
2024-04-22 09:41:14 +02:00
Antoine Toulme 223be4117e
[component] Remove host.ReportFatalError (#9506)
**Description:** 
 Remove `host.ReportFatalError`. It has been deprecated since 0.87.0.

**Link to tracking Issue:**
#6344

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
2024-02-09 12:46:21 +01: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
Daniel Jaglowski fe2ae8defc
Deprecate component.Host.GetExporters (#7390)
Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
2023-05-26 15:34:08 -07: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 bf6dc58854
Do not expose NopHost struct (#2585)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-05 11:04:12 -08:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Bogdan Drutu e29ed74617
Add tests to componenttest to make codecov happy (#1231)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-29 15:20:17 -07:00
Tomasz Piekarczyk 2826531738
Use stretchr/testify/require instead of t.Fatal (#266) (#1190) 2020-06-25 09:24:19 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Bogdan Drutu e21cdcf428
Consolidate test host implementations under componenttest (#785)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-08 10:26:18 -07:00