Commit Graph

23 Commits

Author SHA1 Message Date
Bogdan Drutu aa67926c69
Move issuegenerator to cmd so go mod tidy resolves dependencies (#1284)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-07 20:00:17 -07:00
Pavol Loffay 97d9d86c88
Add batch size metric (#1241)
* Add batch size metric to otel collector

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

* Rename variable

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-07-07 16:30:22 -07:00
Juraci Paixão Kröhling 64403a6683
Handle errors in exporters (#1259)
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2020-07-03 06:41:46 -07:00
Akash Suresh caadbbc476
Decentralize component documentation (#1089)
* Split out processor READMEs

* Split out exporter READMEs

* Split out extension READMEs

* Split out receiver READMEs

* Add new line at end of READMEs
2020-06-05 11:33:32 -07:00
Constance Caramanolis ce04b86e91
Unblock prs with modified shutdown test (#1071)
The order in which Consume* and Shutdown get handled for batch processor is inconsistent when called back to back. This results in the number of items getting passed through to be inconsistent. To unblock tests and maintain coverage, the tests only check if some data got through and the batching size is 1. 

Issue #1070 has been opened to properly fix the test and ensure the total number of items sent is accounted for after shutdown has been invoked.

**Link to tracking Issue:** Fixes issue #1066 and #1069 

**Testing:** Run each of the test 100 times and no test failures.
2020-06-03 13:02:32 -04: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
James Bebbington 9ab50d3f93
Refactor testify assertions for nil errors to use the NoError function instead (#925) 2020-05-07 06:37:45 -07:00
Bogdan Drutu ca4b8231de
Rename MoveTo to MoveAndAppendTo. (#875)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-27 08:06:35 -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 5e019a7999
Fix flaky test TestBatchProcessorSentByTimeout (#861)
Elapsed time measurement was set incorrectly. Timeout to compare elapsed time against is triggered with newBatchProcessor, move it below the timer start.
2020-04-22 14:27:42 -07:00
Dmitrii Anoshin 27277a675f
Switch queued_retry processor to internal data model (#824) 2020-04-21 17:45:43 -07: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 0bc0d57022
Add context to start and stop methods in the component (#790)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-06 10:59:17 -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
Liz Fong-Jones bfff609d0a
initial switch to circleci (#702)
* initial switch to circleci

* update docs

* test packages in batches of 10.

* update golangci to have go1.14 vet support

* roll back go.mod, move to separate pull.

* allow running longer to avoid circleci timeout.

* further increase timeout.

* further increase timeout.

* fix data race, adjust timeout.

* 10 min timeout (will decrease with parallelism later)

* batch/parallelize all test executions.

* modularize circleci

* add loadtest tools

* optimize running time

* address review feedback
2020-03-26 11:08:20 -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
Paulo Janotti b9dc8ec8a3
Update processor metrics to obsreport (#606)
Initial updates to migrate processor metrics to obsreport package, ie.: the new metrics.

Cleaned-up a bit some of the processor metrics and spelled out the rule names for new metrics.

Related to https://github.com/open-telemetry/opentelemetry-collector/issues/141

Testing: Added test for the processor common metrics, validated manually that legacy metrics were still working
2020-03-16 09:41:02 -04: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
ferhat elmas e94b779f58 Integrate golangci-lint and enable scope linting (#428)
* Integrate golangci-lint to easily extend linting capabilities later
  - that's why separate fmt, vet, etc. targets are dropped and all are run through umbrella lint target, golangci-lint.
* Additionally enabled scopelint and fixed one issue
  - it's disabled for test files because it gives false positive - https://github.com/kyoh86/scopelint/issues/4.
* Misspell on go files are also run by golangci-lint, that's why `ALL_SRC_AND_DOC` is simplified to `ALL_DOC`.

Fixes #342
2019-12-02 11:33:25 -05:00
Paulo Janotti 487742e7c5
Fix processor metric tag key and add queued retry name (#420)
For historical reasons the tag associated to the name of a processor was still named "exporter", changed that to "processor". Added also the name of the queued retry instance to be used as the name of the processor.
2019-11-15 07:56:54 -08: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