Flc゛
80cb909774
refactor: replace context.Background() with t.Context()/b.Context() in tests ( #7352 )
...
Based on the Go version we currently use, the dependency already
supports 1.24+, which allows using `t.Context()` and `b.Context()` in
unit tests and benchmarks respectively.
- Enable `context-background` and `context-todo` in
[`usetesting`](https://golangci-lint.run/docs/linters/configuration/#usetesting )
- Adjust the code to support linter detection
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Tyler Yahn <codingalias@gmail.com >
Co-authored-by: Damien Mathieu <42@dmathieu.com >
2025-09-23 09:52:45 +02:00
Matthieu MOREL
982391315f
chore: enable gocritic linter ( #7095 )
...
#### Description
Enable and fixes several rules from
[gocritic](https://golangci-lint.run/usage/linters/#gocritic ) linter
---------
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-07-29 09:20:32 -07:00
Matthieu MOREL
e98ef1bfdb
[chore]: enable usestdlibvars linter ( #6001 )
...
#### Description
[usestdlibvars](https://golangci-lint.run/usage/linters/#usestdlibvars )
is a linter that detect the possibility to use variables/constants from
the Go standard library.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2024-11-25 12:02:46 -08:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Tyler Yahn
56d420112f
Simplify trace context benchmark test ( #2109 )
...
Remove unnecessary use of the http Request type and the oteltest
package.
2021-07-21 07:25:18 -07:00
Anthony Mirabella
e88a091a72
Make SpanContext Immutable ( #1573 )
...
* Make SpanContext Immutable
* Adds NewSpanContext() constructor and SpanContextConfig{} struct for
constructing a new SpanContext when all fields are known
* Adds With<field>() methods to SpanContext for deriving a SpanContext
with a single field changed.
* Updates all uses of SpanContext to use the new API
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com >
* Update CHANGELOG.md
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com >
* Add tests for new SpanContext constructor and derivation
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com >
* Address PR feedback
* Fix new uses of SpanContext from main
2021-03-09 08:17:29 -08:00
Punya Biswal
3bce9c97f8
Add Keys() method to propagation.TextMapCarrier ( #1544 )
...
...and propagation.HeaderCarrier to adapt http.Header to this interface.
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2021-02-17 08:04:49 -08:00
Krzesimir Nowak
63a11144cf
Move baggage and propagation to separate packages ( #1325 )
...
* Move propagation code to propagation package
* Move baggage code to baggage package
* Update changelog
* Make docs of baggage.Set more clear
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2020-11-13 07:34:24 -08:00