cherry-pick of
d82267dd69
`go.opentelemetry.io/otel/exporters/prometheus v0.59.1` does not fully
fix the metric name issue so we have to revert to v0.58.0
Downgrades opentelemetry-go dependencies effectively reverting #13289
and others
- Due to a
[bug](https://github.com/open-telemetry/opentelemetry-go/issues/7039) in
the prometheus exporter, if you are configuring a prometheus exporter,
the collector's internal metrics will be emitted with an unexpected
suffix in its name. For example, the metric
`otelcol_exporter_sent_spans__spans__total` instead of
`otelcol_exporter_sent_spans_total`. The workaround is to manually
configure `without_units: true` in your prometheus exporter config
```yaml
service:
telemetry:
metrics:
readers:
- pull:
exporter:
prometheus:
host: 0.0.0.0
port: 8888
without_units: true
```
If you are using the collector's default Prometheus exporter for
exporting internal metrics you are unaffected.
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
Co-authored-by: alex boten <223565+codeboten@users.noreply.github.com>
#### Description
This changes the config for the default Prometheus exporter to remove
`disable_scope_info: true`. This prevent errors in the exporter caused
by metrics only differentiated by their scope being considered aliasing,
which will become more common when the `telemetry.newPipelineTelemetry`
feature gate graduates (see tracking issue for details).
I marked this as a "breaking change", but I'm not sure if we make
guarantees about the format of the Prometheus metrics we emit?
#### Link to tracking issue
Fixes#12939
#### Testing
I updated some tests to reflect the additional labels added to
Prometheus metrics.
I performed manual testing and confirmed that the reproduction case in
the tracking issue no longer emits an error when the feature gate is
enabled.
#### Description
Upgrading the collector to use opentelemetry-go-contrib
v1.35.0/v0.60.0/v0.29.0/v0.15.0/v0.10.0/v0.8.0/v0.7.0
See changelog here:
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.35.0
<!-- Issue number if applicable -->
#### Link to tracking issue
none available
<!--Describe what testing was performed and which tests were added.-->
#### Testing
I ran `make all` but happy to run other targets if needed
This PR does a couple of things that I couldn't quite split up so I put
together a PR w/ individual commits to help reviewers get through it.
This PR does the following:
1. update `go.opentelemetry.io/contrib/config` package to latest. this
brings in breaking changes. in order to prevent those breaking changes
from impacting end users, i've also added a layer of config unmarshaling
2. updates the collector to instantiate the meter provider (and
exporters) via the config package. this allows us to remove all the code
in `otelinit`. the reason for including this change was that
unmarshaling the config was causing circular dependencies i didn't want
to address by moving code that could be deleted around.
Replacement for
https://github.com/open-telemetry/opentelemetry-collector/pull/11458.
Fixes
https://github.com/open-telemetry/opentelemetry-collector/issues/12021
---------
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
#### Description
[Thelper](https://golangci-lint.run/usage/linters/#thelper) detects
tests helpers which is not start with t.Helper() method.
This only enables rules for naming and paramter order
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>