<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Creates `NewNopSettingsWithType` function on test modules and deprecates
the `NewNopSettings` functions on those modules. Replace all usages of
`NewNopSettings` with `NewNopSettingsWithType`.
Part of #12305 but applied to all component kinds.
#### Link to tracking issue
Updates #12221
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>
This PR also solves one more issues with the new interface, which is the
ability to record multiple observations for a single async metric using
one callback.
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
Completion of #12167 , cc @bogdandrutu
Updated one test to verify the change, will update the rest ones after
this PR merges.
<!-- Issue number if applicable -->
#### Link to tracking issue
n/a
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added
<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Removes `level` field. This will be added back in the future once #11754
is completed.
#### Link to tracking issue
Updates #11061
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>
These were only used by the memory limiter processor and were never
automatically calculated by the processorhelper. It's better to move
them to processor specific metrics that can be managed within the
component itself.
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This allows component authors to specify the stability level of
telemetry emitted by components. This provides visibility to end users
as to what they can expect from the telemetry.
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This updating the existing metric points that were recently added to use
signal as an attribute instead of separating the metric name. It follows
the suggestions in [otep
259](https://github.com/open-telemetry/oteps/pull/259) for the metric
and attribute names.
Putting this in draft to get some feedback from @djaglowski before
moving forward with this change
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.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>
This will make it available to most components, as the
generated_telemetry is only generated for components that have internal
telemetry configured. Arguably the scope name should be moved to its own
file, but i'd rather not add yet another file if possible.
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This can be used by components that need to set their scope name
manually. Will save component owners from having to store a variable,
which may diverge from the scope name used by the component for emitting
its own telemetry. There are about a dozen components in contrib that
could use this today.
Alternatively, I could just update the scope name strings in the
components manually.
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This updates units for processhelper's internal telemetry.
Related #10556
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/10651
For this PR i updated `metadata.yaml` and ran `make gogenerate`, then
`make -C processor test`
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
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>
#### Link to tracking issue
Resolves#10353
#### Testing
Added equivalent testing to other processor metrics (accepted, refused,
dropped).
#### Documentation
Metric documentation is autogenerated.
#### Open Question
My initial implementation includes a breaking change to
`componenttest.TestTelemetry` which is public facing API. If we want to
avoid an immediate breaking change in this test package, I would propose
the following, which I can submit in a prerequisite PR:
1. Deprecate all `TestTelemetry.Check*` methods.
2. Replace with more granular `TestTelemetry.CheckOneSpecificMetric`
methods.
This will be used in a follow up PR that allows initialization of
optional internal metrics which address the queue metric use-case.
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>
This PR adds the ability to configure asynchronous (observable)
instruments via mdatagen. This requires providing a mechanism to set
options to pass in the callbacks that will be called at the time of the
observation.
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This updates the processor helper to use mdatagen for its internal
telemetry.
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>