Commit Graph

45 Commits

Author SHA1 Message Date
Bogdan Drutu 8f20a07847
[chore] Small nits in batch processor, use generics to avoid type conversions (#11501)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-21 16:21:33 -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
Alex Boten 834413537b
[telemetry] mark useOtelForInternalMetrics stable (#9102)
This marks the flag as stable. Leaving this as a draft until v0.92.0 is
released.

Closes https://github.com/open-telemetry/opentelemetry-collector/issues/8962
Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/816

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-16 15:38:21 -08:00
Alex Boten 36bdd22601
[chore] use mdatagen for batch processor (#9183)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-12-22 11:12:32 -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
Joshua MacDonald aa206e399c
Add batchprocessor support for client metadata (#7578) 2023-05-16 11:41:33 -07:00
Bogdan Drutu fec9cd3dda
Change featuregate.Registry to return registered Gate (#6998)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-24 12:15:11 -08:00
Bogdan Drutu 430fb80141
[chore] limit usage of the use otel feature gate, pass the bool directly to simplify usage (#6985)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 18:29:21 -08:00
Bogdan Drutu 1699701fd6
Deprecate featuregate.GetRegistry in favor of GlobalRegistry (#6979)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 15:08:13 -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
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
Gustavo Paiva 2da68656b8
Instrument `batch` processor with Otel Go (#6423)
- Instrument batch processor with OpenTelemetry Go.
- Also fixed a small typo on the bucket definition of the batch_send_size_bytes view of OpenCensus.
2022-11-16 15:08:28 -08:00
Bogdan fbf1e2a09c Revert changes to config.[Receiver|Processor|Exporter|Extension]Settings
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-11-05 10:04:50 -07: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 495c1db39e
Replace deprecate With[Traces|Metrics|Logs][Receiver|Processor|Exporter] with the new definition (#5759)
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
2022-07-29 11:38:34 -07:00
Alex Boten 9f0d97ca57
add stability level to component factory (#5580)
* add stability level to component factory

* update docstring

* use a map instead of a single stability level

* apply review feedback

* add tests

* fix impi, add changelog

* add processors, receivers

* fix inconsistency

* set noop to stable

* update calls in deprecated func
2022-07-05 14:02:23 -07:00
Bogdan Drutu 004dd4da35
Move everything from processorhelper to component. (#4889)
Updates https://github.com/open-telemetry/opentelemetry-collector/issues/4681

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-22 14:23:40 -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
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
James 85b8094e26
Rename `config.NewID` to `config.NewComponentID` and `config.NewIDFromString` to `config.NewComponentIDFromString` (#4137)
This PR is to rename `config.NewID` to `config.NewComponentID` and `config.NewIDFromString` to `config.NewComponentIDFromString` for naming consistency.  

**Link to tracking Issue:** 
Fixes #4105
2021-09-29 10:28:07 -04:00
Patryk Matyjasek 017aa1dad7
Standarize Settings, Params and Parameters in Processors (#3181)
* Replace ProcessorCreateParams with ProcessorCreateSettings.
Replace all dependencies in Processors.

Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>

* Update changelog

Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>

# Conflicts:
#	CHANGELOG.md

# Conflicts:
#	CHANGELOG.md

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-06-02 06:49:04 -07:00
Bogdan Drutu 665e9657ac
Use config.ID for Processors config (#3077)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-03 14:46:10 -07:00
Bogdan Drutu 25da8cfb98
Small cleanups in batchprocessor (#3013)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-26 13:52:33 -07:00
Bogdan Drutu c6c758c1cf
Fix all TraceProcessor usages, use TracesProcessor (#2935)
* Fix all TraceProcessor usages, use TracesProcessor

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

* Update changelog

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-14 14:04:27 -07:00
Bogdan Drutu 1edaf40ced
Add New funcs for extension, exporter, processor config settings (#2872)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-31 16:50:05 -07:00
Bogdan Drutu e7c74eb2fd
Move configmodels to config (#2808)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-26 12:14:35 -07:00
Bogdan Drutu 0c6757ec71
Rename [Traces|Metrics|Logs]Consumer to [Traces|Metrics|Logs] (#2761)
* Rename [Traces|Metrics|Logs]Consumer to [Traces|Metrics|Logs]

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

* Update internal/testcomponents/example_exporter.go

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
2021-03-23 08:04:44 -07: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 a3fa0a9166
Rename processor component.TraceProcessor to component.TracesProcessor, and equivalent Create method feature request (#2026)
Fixes #1975

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-28 18:11:25 -04:00
Bogdan Drutu 99cb5b244a
Rename consumer.TraceConsumer to consumer.TracesConsumer (#1981)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-20 10:56:30 -07:00
Ben Keith 889948e2fa
Batch Processor: Log Support (#1723)
This mimics the same logic as metrics for logs in the batchprocessor.
2020-09-02 18:33:26 -04:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Pavol Loffay 815e760588
Add batch size bytes metric to batch processor (#1270)
* Add batch size bytes metrics

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* increase test coverage

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Fix metrics

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Fix test

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-22 11:14:25 -07:00
Bogdan Drutu 545d64e92b
Small cleanups for the factory helpers (#1352)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-14 12:02:48 -07:00
Bogdan Drutu 0c7de066d7
Add helper processor factory to reduce boilerplate (#1339)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-13 21:50:01 -07:00
Constance Caramanolis 4074b3c654
Add the ability to batch metrics as a processor. (#1060)
* Add batching for metrics

* Update documentation

* Improve test coverage
2020-06-02 10:23:26 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Bogdan Drutu a637b41c22
Change entire repo to use the new vanityurl go.opentelemetry.io/collector (#977)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-05-15 12:04:05 -07:00
Tigran Najaryan 9d16f5971e
Declare component Type as a type alias (#860)
We previously used string in the codebase to represent component type
(as it is known to factories and referred to in the config).

Now we have configmodels.Type alias that provides stronger compile-time
type checks.

This is a breaking change for components but fixing the components is easy.

Resolves: https://github.com/open-telemetry/opentelemetry-collector/issues/762
2020-04-24 11:55:04 -04:00
Dmitrii Anoshin 277aa581ad
Switch batch_processor to internal data model (#832)
New internal data structure allows to batch together traces from different resources. This simplify batching a lot. This commit removes most of the functionality for handling many batches per node and uses only one batch with one ticker.
2020-04-15 16:51:27 -07:00
Bogdan Drutu 81cc48ca89
Cleanup processors, remove options, hide ctor (#770)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-02 14:04:02 -07: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
Steve Flanders 7a6e5f1955 Rename nodebatcherprocessor to batchprocessor (#401)
This is for consistency reasons and to ensure configuration parameters
match directory structure.
2019-10-15 16:47:38 -04:00