renovate[bot]
590bcee71b
fix(deps): update module github.com/golangci/golangci-lint to v2 ( #6499 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint )
| `v1.64.8` -> `v2.0.2` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>golangci/golangci-lint
(github.com/golangci/golangci-lint)</summary>
###
[`v2.0.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v202 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.1...v2.0.2 )
1. Misc.
- Fixes flags parsing for formatters
- Fixes the filepath used by the exclusion `source` option
2. Documentation
- Adds a section about flags migration
- Cleaning pages with v1 options
###
[`v2.0.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v201 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.0...v2.0.1 )
1. Linters/formatters bug fixes
- `golines`: fix settings during linter load
2. Misc.
- Validates the `version` field before the configuration
- `forbidigo`: fix migration
###
[`v2.0.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v200 )
[Compare
Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.8...v2.0.0 )
1. Enhancements
- 🌟 New `golangci-lint fmt` command with dedicated formatter
configuration
(https://golangci-lint.run/welcome/quick-start/#formatting )
- ♻️ New `golangci-lint migrate` command to help migration from v1 to v2
(cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#command-migrate ))
- ⚠️ New default values (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- ⚠️ No exclusions by default (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default ))
- ⚠️ New default sort order (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#outputsort-order ))
- 🌟 New option `run.relative-path-mode` (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode ))
- 🌟 New linters configuration (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#linters ))
- 🌟 New output format configuration (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#output ))
- 🌟 New `--fast-only` flag (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#lintersfast ))
- 🌟 New option `linters.exclusions.warn-unused` to log a warning if an
exclusion rule is unused.
2. New linters/formatters
- Add `golines` formatter https://github.com/segmentio/golines
3. Linters new features
- ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter
(`staticcheck`) (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck ))
- `go-critic`: from 0.12.0 to 0.13.0
- `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect
dependencies)
- `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`)
- `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic
message)
- `staticcheck`: new `quickfix` set of rules
- `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`,
`suite-method-signature`, `require-string-msg`)
- `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`)
4. Linters bug fixes
- `bidichk`: from 0.3.2 to 0.3.3
- `errchkjson`: from 0.4.0 to 0.4.1
- `errname`: from 1.0.0 to 1.1.0
- `funlen`: fix `ignore-comments` option
- `gci`: from 0.13.5 to 0.13.6
- `gosmopolitan`: from 1.2.2 to 1.3.0
- `inamedparam`: from 0.1.3 to 0.2.0
- `intrange`: from 0.3.0 to 0.3.1
- `protogetter`: from 0.3.9 to 0.3.12
- `unparam`: from
[`8a5130c`](https://redirect.github.com/golangci/golangci-lint/commit/8a5130ca722f )
to
[`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4 )
5. Misc.
- 🧹 Configuration options renaming (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove options (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove flags (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- 🧹 Remove alternative names (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names ))
- 🧹 Remove or replace deprecated elements (cf. [Migration
guide](https://golangci-lint.run/product/migration-guide/ ))
- Adds an option to display some commands as JSON:
- `golangci-lint config path --json`
- `golangci-lint help linters --json`
- `golangci-lint help formatters --json`
- `golangci-lint linters --json`
- `golangci-lint formatters --json`
- `golangci-lint version --json`
6. Documentation
- [Migration guide](https://golangci-lint.run/product/migration-guide/ )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
2025-03-26 10:46:44 -07:00
Robert Pająk
d7ebb7aa85
log: Add ValueFromAttribute and KeyValueFromAttribute ( #6180 )
...
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/6158
Related spec PR:
https://github.com/open-telemetry/opentelemetry-specification/pull/4373
Benchmark results:
```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/log
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkKeyValueFromAttribute/Empty-20 72029505 16.47 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueFromAttribute/Bool-20 68560222 16.99 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueFromAttribute/BoolSlice-20 14647401 76.21 ns/op 50 B/op 2 allocs/op
BenchmarkKeyValueFromAttribute/Int64-20 70737378 16.92 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueFromAttribute/Int64Slice-20 16780069 96.87 ns/op 64 B/op 2 allocs/op
BenchmarkKeyValueFromAttribute/Float64-20 59299638 16.93 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueFromAttribute/Float64Slice-20 12691222 106.2 ns/op 64 B/op 2 allocs/op
BenchmarkKeyValueFromAttribute/String-20 63837711 16.97 ns/op 0 B/op 0 allocs/op
BenchmarkKeyValueFromAttribute/StringSlice-20 9251001 114.7 ns/op 80 B/op 2 allocs/op
PASS
ok go.opentelemetry.io/otel/log 14.776s
```
2025-01-22 08:26:46 +01:00
Damien Mathieu
a3c512aa95
Fix gosec overflow alerts ( #5799 )
...
To allow the golangci-lint upgrade in #5796 .
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-09-13 09:11:50 +02:00
renovate[bot]
4875735fd8
fix(deps): update module github.com/golangci/golangci-lint to v1.60.2 ( #5711 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint )
| `v1.60.1` -> `v1.60.2` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>golangci/golangci-lint
(github.com/golangci/golangci-lint)</summary>
###
[`v1.60.2`](https://togithub.com/golangci/golangci-lint/compare/v1.60.1...v1.60.2 )
[Compare
Source](https://togithub.com/golangci/golangci-lint/compare/v1.60.1...v1.60.2 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2024-08-23 08:07:25 -07:00
Robert Pająk
1384c27ad0
log: Add missing notice to Bytes, Slice, Map doc comment ( #5598 )
...
Add comment which is already in `BytesValue`, `SliceValue`, `MapValue`.
Maybe it would help mitigating issues like
https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5879 .
2024-07-11 06:39:08 +02:00
Damien Mathieu
08c8b3224a
log: Fix comparison of unordered map values ( #5306 )
2024-05-15 12:28:23 +02:00
Robert Pająk
e6e44dee90
log: Add String method to Value and KeyValue ( #5117 )
2024-04-02 10:50:07 +02:00
Sam Xie
47ac0d4df8
logs: Add empty value for KeyValue ( #5076 )
...
* Add empty value for KeyValue
* Update CHANGELOG
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
* Fix comments
* Update log/keyvalue.go
Co-authored-by: Damien Mathieu <42@dmathieu.com >
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2024-03-15 07:52:24 -07:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Tyler Yahn
561714acb2
Drop support for Go 1.20 ( #4967 )
...
* Update README.md
* Remove 1.20 support from CI workflows
* Update all go mod
* Add changelog entry
* Update go mod tidy target
* Run go mod tidy
* Replace sliceEqualFunc with slices.EqualFunc
* Replace grow with slices.Grow
* Replace ensureAttributesCapacity with slices.Grow
* Replace conditional with min
* Use slices module for slice comparison in metricdatatest
2024-02-25 10:48:32 -08:00
Tyler Yahn
8df89f6aff
log: Remove Value.AsAny ( #4963 )
2024-02-22 20:56:07 +01:00
Tyler Yahn
7b3382e4dc
log: Implement Value and KeyValue types ( #4949 )
...
* Implement `Value` and `KeyValue`
* Add tests for `Value` and `KeyValue`
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-02-21 13:19:41 -08:00
Tyler Yahn
6e2bfb69ed
Rename log List value type to Slice ( #4936 )
2024-02-18 08:08:28 -08:00
Tyler Yahn
d3dcb3999c
Add initial Logs Bridge API scaffolding ( #4907 )
...
* Add go.mod
* Exclude otel/log in versions.yaml
* Add package documentation stub
* Update dependabot config
* Add initial log API scaffolding
2024-02-16 07:09:58 -08:00