Bump github.com/cenkalti/backoff/v4 from 4.1.3 to 4.2.0
Bump google.golang.org/grpc from 1.50.1 to 1.51.0
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporter/otlpexporter
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporter/otlphttpexporter
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /pdata
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /receiver/otlpreceiver
Co-authored-by: bogdandrutu <bogdandrutu@users.noreply.github.com>
Bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0
Bump golang.org/x/sys from 0.1.0 to 0.2.0 in /exporter/loggingexporter
Bump golang.org/x/tools from 0.2.0 to 0.3.0 in /internal/tools
Co-authored-by: bogdandrutu <bogdandrutu@users.noreply.github.com>
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>
The main motivation for this is to allow components (including tests) to not depend on the "service" configuration and be reusable without the otelcol service.
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Main motivation is to ensure that Settings are passed (to enable obsreport usage which requires settings to be passed) as well as the context.
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Signed-off-by: Bogdan <bogdandrutu@gmail.com>
On top of the errorlint errors, also changes `fmt.Errorf("string literal")` with `errors.New("string literal")`.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Split all `pdata` related code by type and move it from `model` to the new module `pdata`.
- `model/pdata` and `model/otlp` are moved to `pdata/plog`, `pdata/pmetric` and `pdata/ptrace`.
- `model/otlpgrpc` is moved to `pdata/plogotlp`, `pdata/pmetricotlp` and `pdata/ptraceotlp`.
Now all the API in `model` except for `model/semconv` is deprecated.
Signed-off-by: Dani Louca <dlouca@splunk.com>
**Description:**
This change 062e64f1d7 caused the memory limiter to "only" start the `checkMemLimits` routine for the ml instance used by the traces processor .
In other words, metrics and logs processor will NOT [drop/refuse](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/memorylimiter.go#L206) data and will pass them down to the next consumer regardless of the current memory pressure as their instance of ml->forcingDrop will not be set.
The simplest solution, is to call start for each processor (metrics, logs, traces) , but this will not be efficient as we'll be running 3 instances of `checkMemLimits`, ie: multiple GC .
But at the same we need to allow multiple instances, with different configs, example: `memory_limiter/another` and `memory_limiter`
````
extensions:
memory_ballast:
size_mib: 4
receivers:
otlp:
protocols:
grpc:
http:
processors:
memory_limiter:
check_interval: 2s
limit_mib: 10
memory_limiter/another:
check_interval: 1s
limit_mib: 100
exporters:
logging:
logLevel: info
service:
telemetry:
logs:
level: "info"
pipelines:
metrics:
receivers: [otlp]
processors: [memory_limiter]
exporters: [logging]
metrics/default:
receivers: [otlp]
processors: [memory_limiter]
exporters: [logging]
traces:
receivers: [otlp]
processors: [memory_limiter/another]
exporters: [logging]
extensions: [memory_ballast]
````
The fix adds a global map to keep track of the different instance and add ~~sync once~~ mutex for the start and shutdown call, so only the first processor can launch the `checkMemLimits` routine and the last one to call `shutdown` to take it down.
If shutdown was called and no `checkMemLimits` has started, then we'll return an error message; unit tests were updated to handle this.
**Testing:**
Tested with above config and using splunk otel instance with valid data.
Made sure only a single `checkMemLimits` is running when there is a single config for memory-limiter and more than one when we have multiple.
I also verified that under memory pressure, when we pass the soft limit, all data types, traces, logs and metrics are getting dropped.
One we agree on this solution, I will look into adding more unit test to validate the change
* 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>
* 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.
* obsreport: wire up ProcessorCreateSettings for processors using obsreport
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Add ToProcessorCreateSettings() to obsreporttest settings
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
* Fix lint issue
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
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