This is the last functionality needed to replace
`metadatatest.Telemetry` with `componenttest.Telemetry`.
The `metadatatest.Telemetry` will be deprecated next release to give
time to change contrib since it is a large change.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
A follow-up PR of #12179 , cc @bogdandrutu
Note: This PR also removes those metric assertions which is actually
testing metrics that doesn't belong to the package. They might be added
due to the limitation of the AssertMetrics function. e.g. changes in
`processor/memorylimitprocessor/memorylimiter_test.go`
<!-- Issue number if applicable -->
#### Link to tracking issue
Relevant to #12179
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated
<!--Describe the documentation added.-->
#### Documentation
n/a
<!--Please delete paragraphs that you did not use before submitting.-->
This PR removes APIs that expose `configtelemetry.Level`. Internal
functionality still uses the Level, but will be soon changed to use the
new Instrument.Enabled.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
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>
#### Description
Reorganizes service to not require `servicetelemetry.TelemetrySettings`
and instead depend directly on `component.TelemetrySettings`
Whether or not we move forward with
https://github.com/open-telemetry/opentelemetry-collector/pull/10725 I
think this is a useful change for service.
#### Testing
Unit tests
This ensures the consistency for folks emitting metrics w/ OTLP until
the OTEP to specify pipeline telemetry is completed.
Waiting on
https://github.com/open-telemetry/opentelemetry-collector/pull/9775
before moving this forward
Fixes#9315
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This reverts the reverts
https://github.com/open-telemetry/opentelemetry-collector/pull/10271 and
adds a mechanism to skip adding a create settings method for the service
package component test. Will need to figure out if
servicetelemetry.TelemetrySettings should be renamed to fit w/ the other
CreateSettings structs before removing this check.
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This ensures backwards compatibility with the metrics generated via
opencensus by default today.
Part of #7454
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>
* Instrument proctelemetry.ProcessMetrics (#67)
* Instrument proctelemetry.ProcessMetrics
* add chloggen
* fix lint and remove unneeded context
* catch potential case where some metricValues are 0
* address review feedback
* rebase and remove unneeded registry
* only run assertMetrics for OC
* address review comments
* rebase and update featuregate function in use
* rebase and update to use new otel metrics api
* fix lint err
* address feedback
* newline
* use multierr for errors