Commit Graph

38 Commits

Author SHA1 Message Date
Antoine Toulme b3e68c3756
[chore] prevent unkeyed literal initialization (#12762)
This relates to
https://github.com/open-telemetry/opentelemetry-collector/issues/12360

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
2025-04-15 08:18: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
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 2278eed236
Remove deprecated funcs from receiver package (#11367)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-07 09:50:35 -07:00
Bogdan Drutu bce1040a63
Deprecate funcs that repeate receiver in name (#11287)
This change makes the names to be more "Go" friendly. Also it will not
become an issue that types will try to implement different Factory types
(receiver,processor) because that is forbidden because of our design.
This also makes the names consistent with connector.Factory.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 09:19:33 -07:00
Bogdan Drutu 5cc717d747
[chore] Move back receiver definitions, make profile embed receiver (#11254)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-26 12:46:40 -07:00
Damien Mathieu 454432e06f
Move receiver builder into internal service (#10781)
#### Description

This moves the receiver builder out of the `receiver` 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.

#### Link to tracking issue

https://github.com/open-telemetry/opentelemetry-collector/pull/10375#pullrequestreview-2144929463
2024-08-21 07:59:38 -07: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 bd784f03e2
Move receiver into an internal package, in preparation for profiles (#10530)
<!--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 receiver 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:25:31 +02:00
Alex Boten 1e44a9c473
[receiver] deprecate CreateSettings -> Settings (#10333)
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-05 13:57:23 -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
Daniel Jaglowski 5cf23d521c
Remove deprecated component.Receiver types (#6882) 2023-01-03 14:08:13 -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 a470d8a8f3
Deprecate component.Receiver* in favor of new receiver.* (#6687)
* Deprecate component.Receiver* in favor of new receiver.*

* Update component/receiver.go

Co-authored-by: Bogdan Drutu <lazy@splunk.com>

* Update component/receiver.go

Co-authored-by: Bogdan Drutu <lazy@splunk.com>

* Update component/receiver.go

Co-authored-by: Bogdan Drutu <lazy@splunk.com>

Co-authored-by: Bogdan Drutu <lazy@splunk.com>
2022-12-08 14:26:14 -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
Paulo Janotti d857771fa6 Remove unused MetricsSource() and TraceSource() methods (#514)
These methods are not being used, removing them to reduce a bit
boiler-plate code of components.
2020-01-22 16:44:58 -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 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
Paulo Janotti 100a230c5c
Remove memory limiting changes (#230)
* Remove memory limiting changes

We paused on that until further design conversations, in order to avoid confusion with this incomplete feature let's remove it from the code base.

* Recover test that covered more than back presssure

* gofmt config_test.go
2019-08-07 07:06:42 -07:00
Owais Lone 831d805e2d Refactor opencensus exporter to make it easily extensible (#212)
Refactored oc exporter code to make it easier to import in derived
builds without copying all the code.

Example derived exporter: https://github.com/owais/example-derived-oc-exporter

- Moved internal/compression to root
- Split opencensusexporter factory's `CreateTraceExporter` method into
  - `OCAgentOptions` and `CreateOCAgent`
2019-07-31 10:59:20 -07:00
Paulo Janotti 0156385dc1 Add receiver host: 1st part of Memory Limiting (#83)
Add Receiver Host Interface

This interface allows better communication between receivers and the code hosting them. This becomes important when the host needs to request receivers to stop ingestion due to limited resources.
2019-07-02 11:55:31 -04: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
Paulo Janotti 92fed7faa5
Make all receivers take "next" on creation (#477)
* Make all receivers take "next" on creation

This is required in order to move the code to use factories for the receivers. The "next" parameter will be passed to the factory and then to the receiver constructor, this way Start[Trace|Metrics]Reception doesn't need the next parameter anymore. Since typically the Start* methods launch goroutines took the opportunity to add a channel to report asynchronous errors.

Opportunistic change: renamed WrapWithSpanSink and related variables.

Remaing items from previous commit

* Improve test coverage for zipkin-scribe

Improving code coverage for zipkin-scribe that went a tad down with the initial PR.

* Improve a little code coverage  zipkin receiver

* Fix test broken during rebase
2019-03-26 18:39:17 -07: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 baec3ed48f
Add the source name to the receiver interface. (#435) 2019-02-26 10:34:35 -08:00
Bogdan Drutu 704542195d
Remove Receiver Trace and Metrics sinks. (#424) 2019-02-21 09:55:08 -08:00
Bogdan Drutu f46d8b4ad2
Remove unused functionality for multi receivers. (#413) 2019-02-15 22:38:36 -08:00
Steven Karis 0dc688149b
Add compression to opencensus receiver/exporter (#347)
Add compression to opencensus receiver/exporter and enable the exporter in the collector
2019-01-24 12:44:10 -08:00
Yang Song f35ec16487 receiver: use TraceData and MetricsData in receivers. (#224)
* receiver: use TraceData and MetricsData in receivers.

* Fix E2E test.
2018-11-20 15:46:40 -08:00
Bogdan Drutu 18467c9e05
Add multi trace/metrics receivers. (#222) 2018-11-20 13:29:29 -08:00
Bogdan Drutu 2e6b5247b2
Move span and metrics syncs in the receiver. (#202)
* Move span and metrics syncs in the receiver.

* fix golint

* Fix collector processor.
2018-11-16 16:40:49 -08:00
Emmanuel T Odeke 20d36a9dd9 spanreceiver.SpanReceiver->spansink.Sink, metricsreceiver.MetricsReceiver->metricsink.Sink
* spanreceiver.SpanReceiver -> spansink.Sink
* metricsreceiver.MetricsReceiver -> metricsink.Sink

Fixes #171
Follow-up of #166
2018-11-07 15:45:50 -08:00
Emmanuel T Odeke c99676e914
all: rename interceptor to receiver
As per the consensus from #151, rename interceptor to receiver
but also the related interfaces too and their methods.

Fixes #166
2018-11-07 14:41:04 -08:00