Commit Graph

26 Commits

Author SHA1 Message Date
Bogdan Drutu 6169e51ba8
Remove deprecated funcs from processorhelper (#11404)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-10-09 09:40:02 -07:00
Bogdan Drutu cceb6c14e0
Remove extra allocation when record metrics (#11365)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-08 19:37:35 -07:00
Bogdan Drutu 6a8c88d68f
[chore] Improve otel metrics performance, pre-calculate attribute Set (#11288)
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/11293

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-04 11:04:25 -07:00
VihasMakwana d8106f55dd
[chore]: deprecate and remove BuildProcessorMetricName (#11328)
This helper is no longer needed since introduction of `mdatagen`.

Relates
https://github.com/open-telemetry/opentelemetry-collector/issues/11302

---------

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-01 13:24:59 -07:00
Bogdan Drutu fabc575252
Deprecate unused and empty struct processorhelper.ObsReport (#11293)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-28 08:06:31 -07:00
Bogdan Drutu d1286186b7
Remove deprecated funcs form processorhelper.ObsReport (#11289)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-27 16:13:45 -07:00
Tyler Helmuth 77bb849aa0
[component] Refactor to use pipeline.ID and pipeline.Signal (#11204)
#### Description
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/11209

This PR is a non-breaking implementation of
https://github.com/open-telemetry/opentelemetry-collector/pull/10947. It
adds a new module, `pipeline`, which houses a `pipeline.ID` and
`pipeline.Signal`. `pipeline.ID` is used to identify a pipeline within
the service. `pipeline.Signal` is uses to identify the signal associated
to a pipeline.

I do this work begrudgingly. As the PR shows, this is a huge refactor
when done in a non-breaking way, will require 3 full releases, and
doesn't benefit our [End Users or, in my opinion, our Component
Developers or Collector Library
Users](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#target-audiences).
I view this refactor as a Nice-To-Have, not a requirement for Component
1.0.

<!-- Issue number if applicable -->
#### Link to tracking issue
Works towards
https://github.com/open-telemetry/opentelemetry-collector/issues/9429
2024-09-23 07:38:59 -07:00
Alex Boten a3c0565031
[processorhelper] deprecated accepted/refused/dropped metrics (#11201)
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>
2024-09-18 12:33:45 -07:00
Alex Boten 3b50b38d39
[processorhelper] report signal as attribute on incoming/outgoing items (#11144)
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>
2024-09-13 13:07:15 -07:00
Alex Boten 3bcb341c7d
[processorhelper] remove deprecated funcs (#11151)
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-12 11:34:42 -07:00
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 3f9bc53f9f
[processorhelper] deprecating unused methods (#11083)
`[Logs|Traces|Metrics]Inserted` was not used in the core/contrib repos,
marking them as deprecated.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-09 10:09:25 -07:00
Daniel Jaglowski fa3471825e
Add ingoing and outgoing counts to processorhelper (#10910)
#### Description

Implements ingoing and outgoing counts as described in
https://github.com/open-telemetry/opentelemetry-collector/issues/10708.
2024-09-09 08:19:22 -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 06271a6c50
Fix processor metrics not being reported initially with 0 values (#10857)
This change reverts
https://github.com/open-telemetry/opentelemetry-collector/pull/10693,
which had an unintentional behavior change that made the processor
helper report metrics only if they got values other than `0`.

Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/10855
2024-08-12 13:45:03 -07:00
Daniel Jaglowski 49339e80cc
[chore] Reduce complexity in processorhelper obsreport (#10693)
This PR removes the `recordData` method, which I believe is an unhelpful
abstraction for reporting internal processor metrics.

The drawbacks of the function are minor, but briefly:
1. Recording any metric requires passing in zeros for _all other
metrics_. This is cumbersome to extend because any new metric requires
updating the call to `recordData` for all metrics. It's also fragile
because if we have more than a few metrics it is easy to position the
intended metric incorrectly.
2. Every metric describes one data type, which is passed into
`recordData` but then just used as a switch to get back to code that is
specific to that data type.
3. Every call to `recordData` instantiates N variables, where N is the
number of metrics for each data type.

All of this seems unnecessary as we can just report each metric in one
unambiguous line of code.
2024-07-22 12:54:30 -07:00
Daniel Jaglowski ea7270caba
Add "inserted" metrics to processors (#10372)
#### 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.
2024-06-19 12:15:42 +02:00
Alex Boten 6888f8f7a4
[chore] removing unused loggers (#10354)
These were declared and not used anywhere. Removing them.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-06-06 10:44:09 -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 860632715e
[processorhelper] use mdatagen level and noop meter (#10235)
This cleans up the need to have a level in the ObsReport struct. Added
test to validate the change as none existed before

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-30 08:15:59 -07:00
Alex Boten 4458b43439
[chore] use mdatagen for processorhelper (#10122)
This updates the processor helper to use mdatagen for its internal
telemetry.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-05-09 07:03:07 -07:00
Alex Boten bc879397bb
[telemetry] emit metrics with _ instead of / (#9775)
This is addressing an issue w/ the names of the metrics generated by the
Collector for its internal metrics. Note that this change only impacts
users that emit telemetry using OTLP, which is currently still in
experimental support. The prometheus metrics already replaced `/` with
`_`.

Fixes #9774

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-04-03 14:42:27 -07: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 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 e116f8c928
[chore] remove duplicated variable definitions (#8500)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-09-22 07:28:08 -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