Commit Graph

22 Commits

Author SHA1 Message Date
Matthieu MOREL 564818fd7f
[chore]: fix testifylint rules (#12791)
#### Description

Fixes testifylint rules which where disabled with golangci-lint v2
upgrade

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-02 23:10:07 +00:00
Pablo Baeyens c1af501cf7
[connector,exporter,processor,receiver] Error out on mismatched type (#12381)
<!--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 -->

Error out on mismatched type for all component kinds. Same as #12305 but
for all component kinds.

#### Link to tracking issue

Requires #12357
Fixes #12221
2025-02-27 12:24:18 +00:00
Pablo Baeyens 9ea6963fca
Remove a lot of deprecated symbols (#12421)
<!--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 -->

Remove deprecated symbols

#### Link to tracking issue
Updates #12222, #12305, #11524
2025-02-18 16:57:10 +00:00
Matthieu MOREL 0b978307c2
[chore]: enable gofumpt linter in connector, consumer, exporter, extension and featuregate (#11854)
#### Description

[gofumpt](https://golangci-lint.run/usage/linters/#gofumpt) is a
stricter format than gofmt, while being backwards compatible.

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-12-12 19:25:06 +00:00
Tyler Helmuth 77bb849aa0
[component] Refactor to use pipeline.ID and pipeline.Signal (#11204)
#### Description
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/11209

This PR is a non-breaking implementation of
https://github.com/open-telemetry/opentelemetry-collector/pull/10947. It
adds a new module, `pipeline`, which houses a `pipeline.ID` and
`pipeline.Signal`. `pipeline.ID` is used to identify a pipeline within
the service. `pipeline.Signal` is uses to identify the signal associated
to a pipeline.

I do this work begrudgingly. As the PR shows, this is a huge refactor
when done in a non-breaking way, will require 3 full releases, and
doesn't benefit our [End Users or, in my opinion, our Component
Developers or Collector Library
Users](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#target-audiences).
I view this refactor as a Nice-To-Have, not a requirement for Component
1.0.

<!-- Issue number if applicable -->
#### Link to tracking issue
Works towards
https://github.com/open-telemetry/opentelemetry-collector/issues/9429
2024-09-23 07:38:59 -07:00
Matthieu MOREL 37f783308e
[chore]: enable require-error rule from testifylint (#11199)
#### Description

Testifylint is a linter that provides best practices with the use of
testify.

This PR enables
[require-error](https://github.com/Antonboom/testifylint?tab=readme-ov-file#require-error)
rule from [testifylint](https://github.com/Antonboom/testifylint)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-18 15:02:22 -07:00
Alex Boten fbffbb0820
[chore] small test improvements (#11211)
Clean up some inconsistencies in the test code across the components.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-18 13:47:25 -07:00
Damien Mathieu c4e527e7e8
Remove builders that were deprecated in 0.108.0 (#11019)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

There builders were deprecated in 0.108.0, so they can be removed now.

PRs that deprecated the builders:
* https://github.com/open-telemetry/opentelemetry-collector/pull/10781
* https://github.com/open-telemetry/opentelemetry-collector/pull/10782
* https://github.com/open-telemetry/opentelemetry-collector/pull/10783
* https://github.com/open-telemetry/opentelemetry-collector/pull/10784
* https://github.com/open-telemetry/opentelemetry-collector/pull/10785

cc @mx-psi
2024-08-30 12:38:59 +02:00
Damien Mathieu c270bef12f
Move connector into internal package, in preparation for profiles (#10524)
#### Description

This splits the connector package, so the APIs are in an internal
package, and redefined publicly for logs/metrics/traces.
In preparation for adding profiles to the package.

#### Link to tracking issue
See https://github.com/open-telemetry/opentelemetry-collector/pull/10375

cc @mx-psi

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-07-15 08:52:21 -07:00
Alex Boten 3b3deb8dbe
[connector] deprecate CreateSettings -> Settings (#10338)
This deprecates CreateSettings in favour of Settings.
NewNopCreateSettings is also being deprecated in favour of
NewNopSettings

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-06 10:04:47 -07:00
Antoine Toulme 08a692279c
[component] Deprecate ErrNilNextConsumer (#9526)
**Description:**
Deprecate ErrNilNextConsumer and implement nil checks in the builder
structs.
2024-02-23 13:54:46 -08:00
Alex Boten 062d0a7ffc
[chore] remove unnecessary underscores (#9580)
As per feedback from my previous PR

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-02-13 13:34:53 -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 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
Daniel Jaglowski 490fd6ae5b
Add full component graph build (#7045)
* Add full component graph build

* PR feedback

* Split adding nodes to graph from adding to pipelines

* Rename fanInNode to capabilitiesNode

* Add consumerNode interface

* Clarify comments about start/stop order of graph

* Simplify nextProcessors

* Move virtual node creation to createNodes, simplify createEdges

* Remove node build methods. Pull CreateSettings into buildComponent functions.

* Fix capabilities node MutatesData
2023-02-03 08:29:28 -08:00
Daniel Jaglowski 04fcc6dbed
Parameterize connector data type errors (#6926) 2023-01-17 12:55:36 -08:00
Daniel Jaglowski 1838b8b4ff
Add connector.Builder (#6867) 2023-01-09 13:51:07 -08:00
Daniel Jaglowski 1f3c5fbabe
Add connector.MakeFactoryMap (#6889) 2023-01-04 21:28:24 -08:00
Daniel Jaglowski 7741e08c58
[chore] Fix connector test names (#6804) 2022-12-14 18:12:41 -08:00
Bogdan Drutu 7cb2d7622d
Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings (#6718)
* Remove deprecated comonent.Config.[ID|SetIDName]; Deprecate config.*Settings

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

* Update .chloggen/rmcfgid-1.yaml

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
2022-12-12 14:35:45 -08:00
Daniel Jaglowski 2016043c35
Add connector types (#6689)
* Add connector types

* bump
2022-12-08 10:28:26 -08:00
Daniel Jaglowski bd269df482
Add connector factory (#6611) 2022-11-23 10:15:54 -08:00