Commit Graph

46 Commits

Author SHA1 Message Date
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 7da6b618a7
[service] deprecate TelemetrySettings.MeterProvider (#10912)
This is replaced by a LeveledMeterProvider method on the struct instead.
This
reduces the complexity from the view of component authors, in that
there's no need
to check the level before invoking the meter to record a metric.

Closes
https://github.com/open-telemetry/opentelemetry-collector/issues/9510

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
2024-08-29 12:05:54 -07:00
Dmitrii Anoshin 4d57f5e0b8
[mdatagen] Remove WithAttributes from the telemetry builder constructor (#10608)
Attribute sets for async instruments now can be set as options to
callback setters and async instruments initializers. This allows each
async instrument to have its own attribute set.

Unblocks
https://github.com/open-telemetry/opentelemetry-collector/pull/10593
2024-07-16 10:36:35 -07:00
Alex Boten 9907ba50df
[processor] deprecate CreateSettings -> Settings (#10336)
This deprecates CreateSettings in favour of Settings.
NewNopCreateSettings is also being deprecated in favour of
NewNopSettings
    
Part of #9428

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-06 09:34:53 -07:00
Alex Boten 567a175ed9
[batchprocessor] ensure attributes are set on metadata metric (#10245)
Fixing this bug required a change in mdatagen to ensure attributes could
be passed in to the telemetry builder.
    
Fixes #9674

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-29 09:10:01 -07:00
Alex Boten 1d8c53ff0f
[batchprocessor] use mdatagen for async metric (#10233)
Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/10232,
use mdatagen for async counter

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-28 11:15:55 -07:00
Alex Boten 52a9520fdb
mdatagen: support setting telemetry level in telemetry builder (#10234)
This allows components to set the minimum level needed for them to
produce telemetry. By default, this is set to
`configtelemetryLevelBasic`. If the telemetry level is below that
minimum level, then the noop meter is used for metrics.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-28 08:59:50 -07:00
Alex Boten af4fdd4e34
[batchprocessor] fix broken processor_batch_metadata_cardinality metric (#10232)
Fixes #10231

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-27 12:28:38 -07:00
Alex Boten d73235fc91
[mdatagen] use mdatagen to produce component internal telemetry (#10054)
#### Description

This updates mdatagen to generate internal telemetry for components
based on metadata.yaml configuration.

#### Testing

Added tests to mdatagen and updated the batch processor to use this as
well for synchronous counters and histogram

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-06 14:01:35 -07:00
Dmitrii Anoshin 670c12daeb
Distribute internal metrics across different levels (#9767)
**Description:**

This change distributes the reported internal metrics across available
levels and updates the level set by default:

1. The default level is changed from `basic` to `normal`, which can be
overridden with `service::telmetry::metrics::level` configuration.

2. The following batch processor metrics are updated to be reported
starting from `normal` level instead of `basic` level:
  - `processor_batch_batch_send_size`
  - `processor_batch_metadata_cardinality` 
  - `processor_batch_timeout_trigger_send` 
  - `processor_batch_size_trigger_send` 

3. The following GRPC/HTTP server and client metrics are updated to be
reported starting from `detailed` level:
  - `http.client.*` metrics 
  - `http.server.*` metrics 
  - `rpc.server.*` metrics 
  - `rpc.client.*` metrics

**Link to tracking Issue:**
https://github.com/open-telemetry/opentelemetry-collector/issues/7890
2024-04-16 13:23:44 -07:00
Alex Boten c7f01725b9
use generated meter (#9669)
This follows #9556 and uses the Meter func instead of managing the scope
in the batch processor manually. Replaces #9581

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-03-11 06:32:14 -07:00
Alex Boten 9c7177496f
[chore] remove unused opencensus code (#9108)
Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/9102

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-30 10:19:42 -08:00
Alex Boten 834413537b
[telemetry] mark useOtelForInternalMetrics stable (#9102)
This marks the flag as stable. Leaving this as a draft until v0.92.0 is
released.

Closes https://github.com/open-telemetry/opentelemetry-collector/issues/8962
Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/816

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-16 15:38:21 -08:00
Alex Boten 36bdd22601
[chore] use mdatagen for batch processor (#9183)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-12-22 11:12:32 -08:00
Alex Boten b5635a7a90
remove workaround to ignore for errors when creating instruments (#8575)
The workaround had been put in place because of a restriction on `/`
characters in the name of the instrument. This is no longer an issue.
This PR fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/8346

Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/8574

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-10-04 11:50:26 -07:00
Alex Boten 9549a14a31
deprecate processor API in obsreport (#8496)
These deprecated methods/structs have been moved to processorhelper:
- `obsreport.BuildProcessorCustomMetricName` ->
`processorhelper.BuildCustomMetricName`
  - `obsreport.Processor` -> `processorhelper.ObsReport`
  - `obsreport.ProcessorSettings` -> `processorhelper.ObsReportSettings`
  - `obsreport.NewProcessor` -> `processorhelper.NewObsReport`

Same as the change for the exporter, no functional changes just moving
code over to the
new location.

~Follows
https://github.com/open-telemetry/opentelemetry-collector/pull/8493~

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-09-20 16:51:35 -07:00
Alex Boten eaac340d0b
[chore] update otel go 1.17 (#8299)
Updating dependencies. Includes a workaround #8346, which causes the
collector to ignore instrument name errors returned from instantiating
instruments in otel.

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-09-08 09:29:31 -07:00
Alex Boten 03b56b6bca
[chore] consistently use multierr in otel instatiation (#8376)
This PR updates the instantation of otel instruments in the batch
processor to use multierr instead of returning on the first error it
encounters. This aligns w/ other places in the code where we instatiate
otel instruments.

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-09-07 14:17:02 -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
Joshua MacDonald aa206e399c
Add batchprocessor support for client metadata (#7578) 2023-05-16 11:41:33 -07:00
Alex Boten 5a7b14153a
[chore] update otel-go dep (#7588)
Updating required APIs along the way.

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-02 09:47:52 -07:00
Dmitrii Anoshin b5ebe76960
[chore] Update otel go deps and resolve breaking changes (#7324) 2023-03-06 16:49:59 -08:00
OpenTelemetry Bot ea2e6e38ca
[chore] dependabot updates Mon Jan 30 02:01:43 UTC 2023 (#7074)
Bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0
Bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/exporters/prometheus from 0.34.0 to 0.35.0
Bump go.opentelemetry.io/otel/exporters/prometheus from 0.34.0 to 0.35.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/metric from 0.34.0 to 0.35.0
Bump go.opentelemetry.io/otel/metric from 0.34.0 to 0.35.0 in /component
Bump go.opentelemetry.io/otel/metric from 0.34.0 to 0.35.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.12.0 in /extension/zpagesextension
Bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.12.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/sdk/metric from 0.34.0 to 0.35.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/trace from 1.11.2 to 1.12.0
Bump go.opentelemetry.io/otel/trace from 1.11.2 to 1.12.0 in /component
Bump go.opentelemetry.io/otel/trace from 1.11.2 to 1.12.0 in /extension/zpagesextension
Bump google.golang.org/grpc from 1.52.0 to 1.52.3
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporter/otlpexporter
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporter/otlphttpexporter
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /pdata
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /receiver/otlpreceiver

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
Co-authored-by: Alex Boten <aboten@lightstep.com>
2023-01-30 10:18:31 -08:00
Bogdan Drutu 430fb80141
[chore] limit usage of the use otel feature gate, pass the bool directly to simplify usage (#6985)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 18:29:21 -08:00
Bogdan Drutu 76cf77605d
Remove deprecated funcs in obsereporttest and batchprocessor (#6861)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-04 08:05:30 -08:00
github-actions[bot] 40fcb05dee
[chore] dependabot updates Mon Dec 12 16:56:20 UTC 2022 (#6750)
* dependabot updates Mon Dec 12 16:56:19 UTC 2022
Bump github.com/klauspost/compress from 1.15.12 to 1.15.13
Bump github.com/prometheus/common from 0.37.0 to 0.38.0 in /processor/batchprocessor
Bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.36.4 to 0.37.0
Bump go.opentelemetry.io/contrib/zpages from 0.36.4 to 0.37.0 in /extension/zpagesextension
Bump go.opentelemetry.io/otel from 1.11.1 to 1.11.2
Bump go.opentelemetry.io/otel/exporters/prometheus from 0.33.0 to 0.34.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/metric from 0.33.0 to 0.34.0
Bump go.opentelemetry.io/otel/metric from 0.33.0 to 0.34.0 in /component
Bump go.opentelemetry.io/otel/metric from 0.33.0 to 0.34.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/sdk from 1.11.1 to 1.11.2 in /extension/zpagesextension
Bump go.opentelemetry.io/otel/sdk from 1.11.1 to 1.11.2 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/sdk/metric from 0.33.0 to 0.34.0
Bump go.opentelemetry.io/otel/sdk/metric from 0.33.0 to 0.34.0 in /processor/batchprocessor
Bump go.opentelemetry.io/otel/trace from 1.11.1 to 1.11.2 in /component
Bump go.opentelemetry.io/otel/trace from 1.11.1 to 1.11.2 in /extension/zpagesextension
Bump golang.org/x/tools from 0.3.0 to 0.4.0 in /internal/tools

* [chore] fix deprecated calls (#6754)

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

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

* [chore] fix batchprocessor (#6755)

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

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

* [chore] fix lint (#6756)

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

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

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: bogdandrutu <bogdandrutu@users.noreply.github.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-12 11:01:13 -08:00
Alex Boten f5edb7abb9
[chore] fix typo in comment (#6753)
Signed-off-by: Alex Boten <aboten@lightstep.com>

Signed-off-by: Alex Boten <aboten@lightstep.com>
2022-12-12 09:28:59 -08:00
Bogdan Drutu 9fc03727f5
Remove dependency on batchprocessor from service package (#6730)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-12 07:59:54 -08:00
Daniel Jaglowski fdef8b181a
Deprecate `Processor` related structs and functions in favor of `processor` package (#6709) 2022-12-09 08:09:27 -08:00
Bogdan Drutu d0fe772781
Deprecate component.Config.ID(), add helper for obsreporttest (#5870)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-11-29 14:35:49 -08:00
Gustavo Paiva 2da68656b8
Instrument `batch` processor with Otel Go (#6423)
- Instrument batch processor with OpenTelemetry Go.
- Also fixed a small typo on the bucket definition of the batch_send_size_bytes view of OpenCensus.
2022-11-16 15:08:28 -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 76d1c70874
Remove obsreport.ProcessorMetricViews, use BuildProcessorCustomMetricName where needed (#3316)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-05-26 16:05:51 -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 a409f2a1da
Remove duplicate metrics from memorylimiter (#2841)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-02 15:03:54 -07:00
Bogdan Drutu e695e15f94
Remove level from all the MetricViews calls (#2149)
This is a preparation for enabling per component telemetry level:
* Views are global and they must always be installed; they are no-op if nobody records data;
* Views are global and they must always contain all the labels; In case of measurements being recorded without one of the labels (for perfomance reasons)
  the extra label defined does not have impact, because all the timeseries will have that label as "null" (missing).

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-16 23:11:27 -05:00
Bogdan Drutu e7e6693926
Expose telemetry level in the configtelemetry (#1796)
Next PR will add a config setting that can be embedded in every component config.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-18 16:11:27 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Pavol Loffay 815e760588
Add batch size bytes metric to batch processor (#1270)
* Add batch size bytes metrics

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

* increase test coverage

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

* Fix metrics

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

* Fix test

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

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-22 11:14:25 -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
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
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
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
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