Commit Graph

39 Commits

Author SHA1 Message Date
Bogdan Drutu 8027d80aef
Avoid public APIs with internal params in custom Options (#11054)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-17 13:08:41 -07:00
Damien Mathieu d37fe6ccb7
Add consumer profiles (#10464)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This adds profiles support for consumers.


<!-- Issue number if applicable -->
#### Link to tracking issue
Based on the discussion in #10375.

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
2024-07-09 18:13:54 +02:00
Antoine Toulme db9723b780
[chore] small doc fix (#9177)
A small fix to the doc string of a function to clarify what it returns.
2023-12-22 08:28:18 -08:00
Antoine Toulme 44fbb84a0f
[chore] some doc changes to consumer package (#9150)
small changes to some docs.
2023-12-19 16:02:25 -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 ce71309a1d
Deprecate consumerhelper, move helpers to consumer (#5006)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-03-16 05:24:33 -07: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 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
Eddy Lin ffc56e0399
Added doc.go files to the consumer package and subpackages (#3270)
* Added consumertest doc.go

* Added consumerhelper doc.go

* Fixed typo in consumerhelper doc.go

* Moved consumererror doc to doc.go

* Added consumer doc.go

* Added newline to end of doc.go

* Added simple doc.go

* Fixed typo in pdata doc.go

* Update CHANGELOG.md
2021-05-24 10:50:15 -07:00
Bogdan Drutu ffb332b37b
Add capabilities to consumer, remove from processor (#2770)
* Add capabilities to consumer, remove from processor

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

* Rename baseConsumer

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-11 16:13:47 -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 1269d20fab
Small nit fix in consumer godoc (#2587)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-05 11:06:34 -08:00
Pablo Baeyens 79ae8f2be5
Use new type name (Metrics) instead of old one (MetricsData) (#2378) 2021-01-19 07:47:57 -08: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
Bogdan Drutu 6a4e9a5b26
Remove ConsumerOld (#1631)
* Remove ConsumerOld

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

* Fixed comments

Co-authored-by: James Bebbington <jbebbington@google.com>
2020-08-24 21:27:27 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Ben Keith 4896d31e1e
Make Logs Type Non-internal (#1456)
This allows Logs to be used in the contrib repo.

Most of the references were fixed by sed + 'make fmt'.
2020-07-29 16:58:32 -04:00
Bogdan Drutu 2b37a30aa7
Use Logs as prefix for all components instead of Log (#1416)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-22 10:48:55 -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 0a58f78070
Add factories and component types to support logs data type (#959)
We are planning on experimenting with logs data type in the Collector.
This commit introduces factories and components types for logs and
implements pipeline building for logs.

The data.Log struct is for now empty. We need to wait for OTLP protocol
to define the log data format and we will use it in data.Log.

data.Log is in internal package since logs support is experimental
and is not intended for public usage yet.

Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/957
2020-05-13 16:58:51 -04:00
Bogdan Drutu 5e3b4e2cee
Add pdata.Metrics with an opaque internal data. (#839)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-16 09:01:18 -07:00
Bogdan Drutu c355dff685
Change pdata.TraceData -> pdata.Traces and ConsumeTrace -> ConsumeTraces (#837)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-15 16:20:51 -07:00
Bogdan Drutu 995b153e23
Move internal/data to consumer/pdata. (#835)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-04-15 13:13:55 -07:00
Dmitrii Anoshin 7a85f6fb34
Add internal data -> OC compatibility shims to processors and exporters (#667)
In order to start migrating components from OC to internal data, all parts of the pipeline should be able to automatically convert back to OC if downstream component doesn't work with internal data structure
2020-03-26 09:15:12 -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
Dmitrii Anoshin 497d6c498c
Add compatibility shim between internal and OC metrics (#651)
This defines an internal data -> OC metrics converter that applied automatically between a new type component and a downstream component that can handle only OC metrics in a pipeline.
2020-03-18 13:31:09 -07:00
Tigran Najaryan 2273f1d492
Eliminate unnecessary V2 suffixes from function names (#644)
Certain functions had V2 suffixes where it was necessary to have one.
Even without a sufix they have different signature than equally-named
old functions and thus the compiler can clearly distinguish between
structs which implement the old of V2 interfaces.

Removing the suffixes results in cleaner and more readable code.
Some type names still have to use V2 suffix for now otherwise the
names would conflict with existing old type names.

Thanks, Jay for the hint.
2020-03-17 19:14:14 -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
Dmitrii Anoshin dbdb5eb512
Add compatibility shim between internal and OC traces (#633)
Once new receiver that uses internal data structure added into the pipeline it must be able to work with downstream components that still use old OC traces internally
2020-03-13 18:00:37 -07:00
Tigran Najaryan 65fc2439d4
Introduce internal TraceData and other data structures (#584)
1. Introduced data structures that represent telemetry data in-memory.

2. Renamed OTLP* interfaces and types to *V2 types to denote that they are
   Internal and not OTLP and are the new version of internal data.
   Internal representation is somewhat different from OTLP.

Testing done: unit tests that cover non-trivial functions. Single-line
getters and setters are typically not covered.

Documentation: added doc.go to describe the implementation and usage.

Design doc and benchmarks: https://docs.google.com/document/d/1MSKjMVXQsP51lA6OwpfyLfZhWK-MkGo5vff43LhrqZU/edit#
2020-03-05 10:03:41 -05:00
Tigran Najaryan 4da23d11f0
Add OTLP trace data types, factories and helpers (#534)
This is step one in converting in-memory representation from OC to OTLP. This
change has no effect except in tests. The introduced code is not reachable.

Issue: https://github.com/open-telemetry/opentelemetry-collector/issues/478
2020-02-11 12:48:55 -05: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
Bogdan Drutu e5d25031e9
Move data to consumerdata (#115) 2019-07-03 13:20:22 -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