Commit Graph

32 Commits

Author SHA1 Message Date
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
Jade Guiton 77f824660e
Make MakeFactoryMap generic and move to otelcol (#12220)
#### Description

At the moment, `receiver`, `scraper`, `processor`, `exporter`, and
`extension` each have their own version of the `MakeFactoryMap`
function, which takes a list of Factories and returns it as a map, with
the component name as the key (and an error if there is overlap).
Because all versions are near-identical except for the Factory type
used, and this function is only used in tests and in the code generated
by OCB (`components.go`), it was suggested to make it generic and move
it to the `otelcol` package.

This PR does exactly that. The old `MakeFactoryMap` functions are
deprecated (and may be removed alongside their tests in a future
release). I also had to make a few other odd changes to fit the new
dependency graph.

#### Link to tracking issue
Resolves #12222

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2025-02-13 11:47:22 +00:00
Pablo Baeyens fc644ed67e
Deprecate 'Create*' methods (#12356)
<!--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 -->

Deprecate `Create*` methods. This is a small part of #12305, but applied
to all other component kinds

#### Link to tracking issue
Updates #12221
2025-02-11 17:25:52 +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
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 632461fb91
[chore] Move back processor definitions, make profile embed processor (#11286)
Same as
https://github.com/open-telemetry/opentelemetry-collector/pull/11254 but
for processor

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-27 11:07:54 -07:00
Damien Mathieu 18d5c02ade
Move processor builders into internal service (#10782)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This moves the processor builder out of the `processor` package, and
into `service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

<!-- Issue number if applicable -->
#### Link to tracking issue

https://github.com/open-telemetry/opentelemetry-collector/pull/10375#pullrequestreview-2144929463
2024-08-22 12:22:23 +02:00
Alex Boten e590ed1dd4
[connector,exporter,receiver,extension,processor] remove deprecated funcs/structs (#10423)
Finishing CreateSettings rename.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-07-19 08:13:50 -07:00
Damien Mathieu 6d72c078ea
Move processor into an internal package, in preparation for profiles (#10526)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

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

<!-- Issue number if applicable -->
#### Link to tracking issue
See https://github.com/open-telemetry/opentelemetry-collector/pull/10375


cc @mx-psi
2024-07-18 11:26:57 +02: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
Bogdan Drutu 1bfb1804fb
Continue to disallow directly implementing Factories, but allow it for component.Factory (#6962)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-24 09:50:47 -08:00
Bogdan Drutu 2fc6b0e893
Remove deprecated component [Traces|Metrics|Logs]Processor and ProcessorFactory (#6884)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-04 08:07:07 -08:00
Daniel Jaglowski ba6d664150
Remove deprecated component.ProcessorFactory (#6881) 2023-01-03 18:18:33 -08:00
Bogdan Drutu f907bb5431
Remove deprecated component.[Factories|MakePorcessorFactoryMap] and componenttest.NewNopFactories (#6835)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-19 15:00:02 -08:00
Bogdan Drutu e63aed8fef
Improve service Config types name (#6787) (#6803)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

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

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-15 12:43:00 -08:00
Bogdan Drutu ace2bc6829
Remove deprecated funcs/types from component package (#6769)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-12 18:12:32 -08:00
Daniel Jaglowski fdef8b181a
Deprecate `Processor` related structs and functions in favor of `processor` package (#6709) 2022-12-09 08:09:27 -08:00
Tigran Najaryan c931b9875f
Refactor component and factory interface definitions (#683)
As we are preparing for Beta release we want to cleanup publicly exported
types and interfaces and do all necessary refactoring and breaking changes
now, before the Beta release. We will have a lot less leeway for breaking
changes after the Beta release.

Component related type declarations are now all in the `component` package.
This makes it possible for the interfaces to reference each other. This
was were very restricted earlier because component interfaces were in 5
different packages and many proposals were impossible to implement because
they would result in circular dependencies between packages.

(An example upcoming new capability that is enabled by this refactoring
is for components to query the Host for other components and for factories).

List of changes in this commit:

- Move all factory interfaces and component interfaces to component package.
- Rename old factories and components interfaces to use "Old" suffix for clarity.
- Eliminate forced checks that components implement factories. This is already
  enforced by the compiler when the factory is added to the Defaults() and
  was unnecessary code.
- Eliminated some unnecessary codes (removed overall over 200 lines).
- Run `go mod tidy` on testbed.

Warning: this is a breaking change to publicly exported types and function
signatures. We announced that a breaking change is comming. Once we agree
to merge this commit we will need to announce the exact list of changes
and guide component authors to modify their components accordingly.

Future changes:
- Once all components are migrated to the new internal representation,
  delete all "Old"-suffixed definitions. This will likely be done while
  we are still in Beta phase, before the Stable release.
2020-03-25 13:43:35 -04:00
Tigran Najaryan 98973e7008
Add the rest of V2 factories and interfaces (#626)
- Added V2 metric factories and interfaces for receivers and exporters.
- Added V2 factories and interfaces for processors.
- Creation methods in V2 factories accept a CreationParams struct to
  allow for easier addition of new parameters in the future without
  breaking the interface.

All changes are uniform with previously introduced initial batch of
V2 factories and interfaces (except introduction of CreationParams).

Issue: https://github.com/open-telemetry/opentelemetry-collector/issues/478
2020-03-16 15:44:37 -04:00
Tigran Najaryan 21a70d61d6
Add a memory limiter processor (#498)
This adds a processor that drops data according to configured memory limits.
The processor is important for high load situations when receiving rate exceeds exporting
rate (and an extreme case of this is when the target of exporting is unavailable).

Typical production run will need to have this processor included in every pipeline
immediately after the batch processor.
2020-01-14 13:20:07 -05:00
Tigran Najaryan 91728bc8ce
Make component interfaces uniform (#488)
This change fixes inconsistencies in component interfaces. Motivation:

- Uniformness results in reduction of code that currently has to
  deal with differences.
- Processor.Start is missing and is important for allowing processors
  to communicate with the Host.

What's changed:

- Introduced Component interface.
- Unified Host interface.
- Added a Start function to processors (via Component interface).
- Start/Shutdown is now called for Processors from service start/shutdown.
- Receivers, Exporters, Processors, Extensions now embed Component interface.
- Replaced StartTraceReception/StartMetricsReception by single Start function for receivers.
- Replaced StopTraceReception/StopMetricsReception by single Shutdown function for receivers.

Note: before merging this we need to announce the change in Gitter since it
breaks existing implementations in contrib (although the fix is easy).

Resolves #477
Resolves #262
2020-01-10 08:49:34 -05:00
Tigran Najaryan 01d8d945b6
Add Shutdown() function to processors (#379)
Shutdown() method is added so that we can implement proper
pipeline flushing during collector shutdown. This will be done
in a future PR.
2019-10-08 15:56:19 -04:00
Tigran Najaryan 402b80cabd
Add Capabilities to Processor and use for Fanout cloning decision (#374)
This is part 1 of the task to introduce capabilities and declare
processor's intent to mutate or not mutate consumed data for the
purpose of optimizing pipeline data ownership.

If a processor declares that they mutate data the pipeline
that the processor is in will use cloning fan out connector.
This is done only if the pipeline shares a receiver with another
pipeline.

This ensures that it is safe for processor modify the data (because
pipelines work concurrently) and avoids cloning for pipelines that
consume data from the same receiver but do not modify it.

For more details see:
https://github.com/open-telemetry/opentelemetry-collector/issues/372
2019-10-02 14:35:00 -04:00
Tigran Najaryan dc6b290e3c
Rename all github paths from opentelemtry-service to opentelemetry-collector (#371)
This is part of renaming task: https://github.com/open-telemetry/opentelemetry-service/issues/352
2019-09-27 17:17:03 -04:00
Yang Song a72d9e5bed Fix license header, typos and lints (#160)
* Fix license header, typos and lints

* Update import order
2019-07-17 12:19:43 -07:00
Steve Flanders 559835ceee
Change census-instrumentation to open-telemetry and update authors (#20)
* Change census-instrumentation to open-telemetry and update authors

census-instrumentation/opencensus is now open-telemetry/opentelemetry

"OpenCensus Authors" is now "OpenTelemetry Authors"

"Copyright 2018" is now "Copyright 2019"

Fix go fmt
2019-06-18 14:22:28 -07:00
Tigran Najaryan 9317ffee74
Build pipeline processors based on new configuration (#576)
- Build pipeline processors and plug them into exporters.
- Added tests to verify that single exporter and multiple exporter pipelines
  (fan out) work correctly.
- Minor cleanup in exporters_builder.go
- Fixed opencensus receiver TestCreateReceiver to find available port for
  testing (instead of fixed port which would fail if already listened).
2019-06-14 19:05:34 -04:00
Bogdan Drutu 62b0ae5be7
Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Consumer, add TraceProcessor similar to receiver,exporter. (#473)
* Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Processor

* Rename TraceProcessor to TraceConsumer as discussed.

* Add empty_test for processor.
2019-03-05 17:36:22 -08:00
Bogdan Drutu 344c1fa77a
Add unified interface for receiver/exporter/spanprocessor. (#423)
* Add unified interface for receiver/exporter/spanprocessor.

* Add a noop processor and simplify debug processor.

* Add a noop processor tests.
2019-02-20 19:35:18 -08:00