Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log: Add a possibility to convert standard attributes to log attributes #6158

Closed
pellared opened this issue Sep 5, 2024 · 2 comments · Fixed by #6180
Closed

log: Add a possibility to convert standard attributes to log attributes #6158

pellared opened this issue Sep 5, 2024 · 2 comments · Fixed by #6180
Assignees

Comments

@pellared
Copy link
Member

pellared commented Sep 5, 2024

Add functions converting standard attributes to log attributes.

Originally posted by @pellared in open-telemetry/opentelemetry-specification#4201 (comment)

CC @bogdandrutu

@pellared
Copy link
Member Author

pellared commented Sep 5, 2024

It may become important if we decide that Logs (Bridge) API can be used directly to emit events.

@pellared
Copy link
Member Author

pellared commented Jan 20, 2025

It may become important if we decide that Logs (Bridge) API can be used directly to emit events.

It happened here: open-telemetry/opentelemetry-specification#4352

@pellared pellared changed the title log: Add a possibility convert standard attributes to log attributes log: Add a possibility to convert standard attributes to log attributes Jan 20, 2025
pellared added a commit that referenced this issue Jan 22, 2025
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
```
@github-project-automation github-project-automation bot moved this from Todo to Done in Go: Logs (GA) Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant