Commit Graph

30 Commits

Author SHA1 Message Date
Matthieu MOREL 824c9f7a43
[chore]: enable gofumpt linter in internal, otelcol, pdata, pipeline and processor (#11855)
#### 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>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-12-12 19:21:54 +00:00
Bogdan Drutu 8e000eae83
Remove deprecated funcs from processor package (#11368)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-07 09:36:18 -07:00
Daniel Jaglowski c3f09f4e9a
[processorhelper] Fix bug where record in/out metrics were skipped (#11360)
Resolves #11351
2024-10-04 14:35:22 -07:00
Bogdan Drutu d6cd5935ee
Fix data race condition, concurrent writes to the err variable, causes Undefined Behavior (#11349)
The main issue is that after
https://github.com/open-telemetry/opentelemetry-collector/pull/10910 the
err variable is shared between requests because it uses the same address
as the err defined outside the func.

This is an UB because we are overwriting memory and will cause crashes
like
https://github.com/open-telemetry/opentelemetry-collector/pull/11335,
where the check for not nil happens then gets overwrite with nil and
crashes.

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/11350

---------

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-03 23:32:57 -07:00
Bogdan Drutu 98230db9d3
Deprecate funcs that repeate processor in name (#11310)
Similar with
https://github.com/open-telemetry/opentelemetry-collector/pull/11287

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 15:31:44 -07:00
Bogdan Drutu fabc575252
Deprecate unused and empty struct processorhelper.ObsReport (#11293)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-28 08:06:31 -07:00
Alex Boten 3b50b38d39
[processorhelper] report signal as attribute on incoming/outgoing items (#11144)
This updating the existing metric points that were recently added to use
signal as an attribute instead of separating the metric name. It follows
the suggestions in [otep
259](https://github.com/open-telemetry/oteps/pull/259) for the metric
and attribute names.

Putting this in draft to get some feedback from @djaglowski before
moving forward with this change

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-13 13:07:15 -07:00
Daniel Jaglowski fa3471825e
Add ingoing and outgoing counts to processorhelper (#10910)
#### Description

Implements ingoing and outgoing counts as described in
https://github.com/open-telemetry/opentelemetry-collector/issues/10708.
2024-09-09 08:19:22 -07:00
Alex Boten 9907ba50df
[processor] deprecate CreateSettings -> Settings (#10336)
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 09:34:53 -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 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
Alex Boten db781bc774
[chore] clean up old references in docs (#7637)
This removes the remaining references to components living in the `component` module. Fixes #6578

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-09 15:13:58 -07:00
Daniel Jaglowski fdef8b181a
Deprecate `Processor` related structs and functions in favor of `processor` package (#6709) 2022-12-09 08:09:27 -08:00
Bogdan Drutu d0fe772781
Deprecate component.Config.ID(), add helper for obsreporttest (#5870)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-11-29 14:35:49 -08:00
Bogdan Drutu 1028e3d2a2
Deprecate special Configs for each component type, use a standard opaque Config (#6617)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-11-23 15:02:54 -08:00
Bogdan d6ed8246b6 Deprecate all types and funcs in config package
The main reason is to remove the circular dependency between the config (including sub-packages) and component. Here is the current state:
* component depends on config
* config/sub-package[grpc, http, etc.] depends on config & component

Because of this "circular" dependency, we cannot split for example "config" into its own module, only if all the other config sub-packages are also split.

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-11-05 10:04:49 -07:00
Bogdan Drutu fef6c558ce
Remove deprecated components helpers funcs (#6006)
Signed-off-by: Bogdan <bogdandrutu@gmail.com>

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-08-31 12:48:34 -07:00
Bogdan Drutu ddc996f45a
Fix deprecation version in deprecation message (#5932)
Bogdan was back in time for 1 week :)

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

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-08-17 15:53:39 -07:00
Bogdan Drutu 9e90e25435
Deprecate New*ProcessorWithCreateSettings, update New*Processor to the new API (#5915)
Signed-off-by: Bogdan <bogdandrutu@gmail.com>

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-08-15 15:25:21 -07:00
Bogdan Drutu 7a41e2f47e
Deprecate processorhelper.New*Processor in favor of New*ProcessorWithCreateSettings (#5833)
Main motivation is to ensure that Settings are passed (to enable obsreport usage which requires settings to be passed) as well as the context.

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

Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-08-10 10:54:59 -07:00
Bogdan Drutu e6b5cd54d1
Deprecate componenterror package, move to component (#5383)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-05-17 17:18:08 -07:00
Dmitrii Anoshin 734e25e8de
Split `model` by signal type and move it to the new `pdata` module (#5168)
Split all `pdata` related code by type and move it from `model` to the new module `pdata`.

- `model/pdata` and `model/otlp` are moved to `pdata/plog`, `pdata/pmetric` and `pdata/ptrace`.
- `model/otlpgrpc` is moved to `pdata/plogotlp`, `pdata/pmetricotlp` and `pdata/ptraceotlp`.

Now all the API in `model` except for `model/semconv` is deprecated.
2022-04-11 16:00:26 -07:00
Bogdan Drutu ce71309a1d
Deprecate consumerhelper, move helpers to consumer (#5006)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-03-16 05:24:33 -07:00
Bogdan Drutu c4134ba6f3
Add the StartFunc/ShutdownFunc to component directly (#4803)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-18 11:29:49 -08:00
Bogdan Drutu 0ef0a9ce7b
Use directly the consumer helper funcs in the other helpers packages. (#4719)
Try to understand if the Component helper is necessary, or only having the helper funcs is enough.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-01-26 10:59:26 -08:00
José Carlos Chávez 9d3a8a4608
Adds vanity import check (#4180)
* chore: adds porto and fixes vanity imports.

* chore: fixes target overriding.

* chore: fixes install of porto.

* chore: includes porto as a tool.

* chore: upgrades porto to check internals.

* chore: rebase and update vanity import.

* chore: removes unnecessary space.

* chore: rollsback vanity import in generated files.
2021-10-12 13:47:36 -07:00
Bogdan Drutu 28091a2384
Use Func pattern in processorhelper, consistent with others (#3570)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-07-13 14:35:47 -04:00
Bogdan Drutu fb95c88e72
Change internal tracing to use otel trace (#3567)
For the moment we rely on the global TracerProvider, in a future PR will change that.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-07-08 16:53:11 -07:00
Bogdan Drutu c63d0c68cd
Move pdata in the new package (#3483)
The new module go.opentelemetry.io/collector/model will be created later when the internal data will
also be moved.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-06-25 01:17:31 +03:00
Bogdan Drutu 9a1d11aeaf
Refactor processorhelper to use consumerhelper, split by signal type (#3180)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-13 19:27:39 -07:00