Commit Graph

19 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 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
Pablo Baeyens 183d7edf9f
[extension] Error out if passed extension.Settings has incorrect type (#12305)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Explicitly error out if the passed `component.ID` does not have a
matching `component.Type`

<!-- Issue number if applicable -->
#### Link to tracking issue
Updates #12221
2025-02-07 20:15:42 +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
Bogdan Drutu 9701538c89
Deprecate funcs that repeate extension in name (#11413)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-10 16:10:02 -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
Dakota Paasman 6764622672
[extension] Add ModuleInfo to extension.Settings (#10888)
#### Description
Paired with @djaglowski on adding a new struct, `ModuleInfo`, to
`extension.Settings`. The goal is to make the collector's component go
modules available to extensions that may want to use that information
(in particular the OpAMP extension).

We didn't want to modify the `extension` package but adding this
information to the Settings struct seems to be the most painless way to
make this information available. No function signatures need to be
updated and existing extensions can just ignore the new field on the
Settings struct unless they want the information.

#### Link to tracking issue
Fixes #10876 

#### Testing
Updated existing tests.

---------

Co-authored-by: Dan Jaglowski <jaglows3@gmail.com>
2024-08-21 14:09:36 +02:00
Alex Boten cf0b959a79
[extension] deprecate CreateSettings -> Settings (#10339)
This deprecates CreateSettings in favour of Settings.
NewNopCreateSettings is also being deprecated in favour of
NewNopSettings
    
Part of #9428

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-06 10:33:25 -07: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
Alex Boten 4688461318
[chore] fix unused params (#9578)
Related to #9577

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-02-13 11:04:48 -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
Jacob Aronoff 833cbdaf75
Enable create settings to access resource attributes (#7531)
Adds the ability for create settings to access instantiated resource attributes

Link to tracking Issue: #6599
2023-05-08 09:06:06 -07:00
Daniel Jaglowski 2606ce237b
[chore] Add component 'Builder' tests (#6862) 2023-01-03 13:44:49 -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
Bogdan Drutu c0495807aa
[chore] move tests to non deprecated packages, fix chloggen (#6673)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-05 08:24:30 -08:00
Bogdan Drutu 03370c7ff5
Move Extension/ExtensionFactory to extension package (#6642)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-01 10:39:09 -08:00