#### Description
Testifylint is a linter that provides best practices with the use of
testify.
This PR enables
[bool-compare](https://github.com/Antonboom/testifylint?tab=readme-ov-file#bool-compare)
rule from [testifylint](https://github.com/Antonboom/testifylint)
It's linter provided by golangci-lint.
Here all available rules are activated except those who require to be
fixed. This PR only fixes bool-compare so the quantity of changes stays
reasonnable for reviewers.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Bugfix #5623
As stated in the issue, we need to avoid parsing the key and instead
implement a validation check for it. I've added some unit tests to
verify this fix.
However, I noticed a comment at the top of this file:
```
// Code created by gotmpl. DO NOT MODIFY.
// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
```
It seems that `internal/shared/otlp/envconfig/envconfig.go.tmpl` is the
source template for this file. Since this template matches
`exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go`,
I updated the template to maintain consistency. I’m not entirely sure if
this approach is correct, so please confirm if this is the right course
of action.
---------
Co-authored-by: Fools <54661071+Charlie-lizhihan@users.noreply.github.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Rather than the deprecated InstrumentationLibrary
This is a replacement for
https://github.com/open-telemetry/opentelemetry-go/pull/3104, as after
this, there is no usage of `instrumentation.Library` within the SDK
anymore.
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Part of #5056
It abstracts the `transform` package from `otlploghttp` and makes it a
shared template. Then, it generates the abstracted `transform` package
into `otlploggrpc`.
For full usage of this transform package, check
https://github.com/open-telemetry/opentelemetry-go/pull/5522
This adds the unconvert linter, and fixes every new issue related to it.
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Revert "otlpmetrichttp: Use go.opentelemetry.io/proto/slim/otlp (#5222)"
This reverts commit 6e92163d6adf91ec77fa41c155c557da6e078563.
* Revert "otlploghttp: Use go.opentelemetry.io/proto/slim/otlp (#5216)"
This reverts commit fe3de7059e19a0e88c7e8b342ed345e50df94aa3.
* Remove slim dep
* Fix CI
* Use gofumpt instead of gofmt in golangci-lint conf
* Run gofumpt fixes
* Format generated templates
---------
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Deprecate the aggregation pkg
* Decouple the internal/aggregate from aggregation pkg
* Add Aggregation to the metric pkg
* Do not use sdk/metric/aggregation in stdoutmetric exporter
* Update all generated templates
* Update prom exporter
* Fix view example
* Add changes to changelog
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Rename Sum to AggregationSum
* Fix comments
* Centralize validation of aggregation in pipeline
* Remove validation of agg in manual_reader selector opt
* Fix merge
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Stop generating otlptrace/internal and deprecate
* Remove the tracetransform templates
They are no longer used.
* Add change stub to changelog
* Add PR number to changelog
* Upgrade all use of semconv to v1.21.0
* Add change to changelog
* Add AIX and ZOS OS support
* Upgrade semconv for merged changes
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Add shared otlpmetric templates
* Generate otlpmetricgrpc/internal with gotmpl
* Use local internal in otlpmetricgrpc
* Add decoupling change to changelog