Commit Graph

32 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
Bogdan Drutu 1245955ccf
Remove obsreportconfig package, reduce dependencies (#11148)
Small issue that the `SpanNameSep` is duplicated, but is a very small
duplicate.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-11 14:07:13 -07:00
Alex Boten 4458b43439
[chore] use mdatagen for processorhelper (#10122)
This updates the processor helper to use mdatagen for its internal
telemetry.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-09 07:03:07 -07: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 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 ce71309a1d
Deprecate consumerhelper, move helpers to consumer (#5006)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-03-16 05:24:33 -07:00
Bogdan Drutu c4134ba6f3
Add the StartFunc/ShutdownFunc to component directly (#4803)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-18 11:29:49 -08:00
Bogdan Drutu 0ef0a9ce7b
Use directly the consumer helper funcs in the other helpers packages. (#4719)
Try to understand if the Component helper is necessary, or only having the helper funcs is enough.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-01-26 10:59:26 -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
Bogdan Drutu fb95c88e72
Change internal tracing to use otel trace (#3567)
For the moment we rely on the global TracerProvider, in a future PR will change that.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-07-08 16:53:11 -07:00
Min Xia f72eab07be
Hide OpenCensus reference from public APIs in obsreport package (#3253) 2021-05-26 11:04:00 -07:00
Bogdan Drutu 9a1d11aeaf
Refactor processorhelper to use consumerhelper, split by signal type (#3180)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-13 19:27:39 -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 d96a7fd4b1
Use config.ComponentID in processor helper internal (#3095)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-04 14:48:52 -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 89ce19d611
Add RemoveIf func to all slices (#2998)
* Add Filter func to all slices

Changed probabilisticsamplerprocessor and filterprocessor to show how we can simplify code. Other places can also be improved.

Benchmarks Before:
```
goos: darwin
goarch: amd64
pkg: go.opentelemetry.io/collector/processor/filterprocessor
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkStrictFilter
BenchmarkStrictFilter-16    	    2613	    433773 ns/op	  270314 B/op	    7039 allocs/op
PASS

Process finished with the exit code 0
```

Benchmarks After:
```
goos: darwin
goarch: amd64
pkg: go.opentelemetry.io/collector/processor/filterprocessor
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkStrictFilter
BenchmarkStrictFilter-16    	   42373	     26623 ns/op	       0 B/op	       0 allocs/op
PASS

Process finished with the exit code 0
```

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

* Change Filter to RemoveIf

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-27 09:25:31 -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 64fe8f0d03
Follow golang pattern and name public function types with Func suffix (#2880)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-13 12:23:53 -07:00
Pablo Baeyens 08a18d5b9f
Add missing documentation (#2837)
* Add comment linter

For now I am excluding
- Internal packages
- Testbed packages
- Constant blocks (since the type docs is usually enough)

* Document consumer folder

* Document processor folder

* Document component folder

* Document config folder

* Document service folder

* Add nosec directive for testbed

* Document testutil folder

* Document receiver folder

* Document exporter folder

* Document cmd/schemagen folder

* Document translator folder

* Document cmd/mdatagen

* Document obsreport folder

* Remove outdated package config comment

* Update .golangci.yml

* Update .golangci.yml

Co-authored-by: Bogdan Drutu <lazy@splunk.com>
2021-03-31 16:38:40 -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 4ae0fc1149
Use Option pattern for componenthelper (#2778)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-24 13:43:00 -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 45ea954311
Add more trace annotations, so zpages are more useful to determine failures (#2206)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-23 14:23:24 -08:00
Bogdan Drutu 8ceddba7ea
Reduce duplicate code in components helper (#2186)
Add componenthelper package to help building components like Processors, Exporters.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-20 07:17:46 -08:00
Bogdan Drutu 8e8cb7078a
Remove usage and the global funcs in obsreport (#2161)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-16 12:44:09 -08: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
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Annie Fu 052b36eac7
If filterprocessor filters all data, stop further processing (#1500) 2020-08-13 11:30:16 -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
Bogdan Drutu afc47961e0
Add processor helper. In the future add metrics and tracing (#1359)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-15 12:26:39 -07:00