Commit Graph

12 Commits

Author SHA1 Message Date
Matthieu MOREL 808fb7c260
[chore]: enable gofumpt linter in client, cmd, component, config and confmap (#11587)
#### 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-11 08:50:57 +00: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
Antoine Toulme 39d2a0a59f
[configtelemetry] move implementation checks to test files (#9432)
**Description:**
 move implementation checks to test files
**Link to tracking Issue:** 
#9431
2024-01-30 12:32:38 -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
Dmitrii Anoshin 375a8590c5
[configtelemetry] Update strings returned by `Level.[String|MarshalText]` (#6533)
- All returned strings are capitalized.
  - "" is returned for integers that are out of Level enum range.
  - It also affects `Level.MarshalText` output, but it's not a problem because `UnmarshalText` method accepts strings in
  all cases, e.g. "normal", "Normal" and "NORMAL".
2022-11-14 12:26:26 -08:00
Jeffrey Chien e9311f6af5
Add config marshaler. (#5566) 2022-09-29 16:15:47 -07:00
Bogdan Drutu dc39c10a52
configtelemetry: remove unnecessary private func, add unittests for public funcs (#5349)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-05-12 09:53:34 -07:00
Bogdan Drutu 04374c197f
Remove deprecated funcs in configtelemetry (#4808)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-07 09:16:16 -08:00
Anthony Mirabella e080cae46f
Enable configuring telemetry through service config file (#4069)
* consolidate flags for configuring telemetry

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Enable configuring metrics via service config

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Make components take MetricsLevel from TelemetrySettings

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Fix lint errors

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Remove configuration for metrics prefix and adding instance ID

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Make entire Collector available to telemetry initialization, use it to set metrics prefix to buildInfo.Command

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* fix metrics prefix tests

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Fix lint errors

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* config/telemetry: parseLevel() no longer needs to be exported

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* config/telemetry: remove intanceID and prefix flags

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Apply PR feedback

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* address PR feedback

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Avoid linter complaining about use of deprecated functions

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-12-16 10:29:28 -08:00
Bogdan Drutu 6ac579e9bc
Add config settings for component telemetry, move the flag (#2148)
Next steps will be to use the new settings in the processors.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-14 08:49:31 -05:00
Bogdan Drutu 03da4a9cbb
Move parsing level logic to configtelemetry (#2123)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-12 16:58:06 -05:00