Nesterov Yehor
5e9a80b3ce
attribute: add BYTESLICE type support ( #7948 )
...
Fixes #7933
Add BYTES type to https://pkg.go.dev/go.opentelemetry.io/otel/attribute
- Introduces BYTES type and byte
- Adds Bytes / BytesValue constructors
- Implements hashing support
- Adds base64 representation in Emit()
- Adds test coverage for constructors, hashing, and set equality
```
$ go test -run=^$ -bench=BenchmarkByteSlice
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkByteSlice/Value-20 149529567 7.993 ns/op 0 B/op 0 allocs/op
BenchmarkByteSlice/KeyValue-20 136973736 8.768 ns/op 0 B/op 0 allocs/op
BenchmarkByteSlice/AsByteSlice-20 562915658 2.120 ns/op 0 B/op 0 allocs/op
BenchmarkByteSlice/Emit-20 29149410 40.26 ns/op 16 B/op 1 allocs/op
PASS
```
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2026-04-07 09:39:32 +02:00
Robert Pająk
1737ab8666
docs: unify doc comments for functions returning bool ( #7064 )
...
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7063
If also fixes Go Doc comment for `SpanID.IsEmpty`.
The pattern is based on the way the Go standard library documents
functions returning a boolean.
2025-07-23 07:58:50 +02:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Tyler Yahn
ef126f5ce1
Remove deprecated Array from attribute package ( #2235 )
...
* Remove deprecated Array from attribute pkg
* Add changes to changelog
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com >
2021-09-10 11:51:02 -04:00
Tyler Yahn
87d09df346
Deprecate Array attribute in favor of *Slice types ( #2162 )
...
* Deprecate Array attribute in favor of *Slice types
* Use new attr types in Jaeger exporter
* Use slice attr types in otlpmetric
* Use slice attr types in otlptrace
* Use slice attr types in zipkin exporter
* Remove array attr test from deprectated oteltest func
* Use StringSlice for cmd arg resource attr
* Add changes to the changelog
* Remove use of deprecated Array func
2021-08-12 08:05:42 -07:00
Tyler Yahn
a882ee3792
Clarify the attribute package documentation and order/grouping ( #2168 )
...
* Clarify attr key docs and func grouping
* Update KeyValue func docs and ordering
* Move IntValue creation function closer Int64Value
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com >
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2021-08-11 10:08:46 -07:00
Punya Biswal
ecf65d7968
Rename otel/label -> otel/attribute ( #1541 )
...
* Rename otel/label -> otel/attr
Leave the imported name alone, to avoid a large diff and conflicts
* Better import comment
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
* otel/attr -> otel/attribute
* Missed the changelog entry
* Get rid of import renaming
* Merge remaining conflicts
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com >
2021-02-18 12:59:37 -05:00