-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log: Add ValueFromAttribute and KeyValueFromAttribute (#6180)
Fixes #6158 Related spec PR: open-telemetry/opentelemetry-specification#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 ```
- Loading branch information
Showing
4 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters