<!--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>
* [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>
* 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.
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>
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
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
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.
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.
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.
- 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
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
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#
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
* 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
- 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).
* Rename [Trace|Metrics]DataProcessor to [Trace|Metrics]Processor
* Rename TraceProcessor to TraceConsumer as discussed.
* Add empty_test for processor.