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>
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>
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>
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>
#### 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>
**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
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>
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>
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>
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>
* [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>
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>
* 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>
- Instrument batch processor with OpenTelemetry Go.
- Also fixed a small typo on the bucket definition of the batch_send_size_bytes view of OpenCensus.
* 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.
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>
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.
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
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.