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

Logs API to have ergonomics for reusing Standard Attributes #4373

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

pellared
Copy link
Member

@pellared pellared commented Jan 17, 2025

@pellared pellared self-assigned this Jan 17, 2025
@pellared pellared marked this pull request as ready for review January 20, 2025 11:44
@pellared pellared requested review from a team as code owners January 20, 2025 11:44
@carlosalberto carlosalberto changed the title Logs API to have ergonimics for reusing standard attributes Logs API to have ergonomics for reusing standard attributes Jan 20, 2025
specification/logs/api.md Outdated Show resolved Hide resolved
specification/logs/api.md Outdated Show resolved Hide resolved
@pellared pellared requested a review from lmolkova January 21, 2025 17:03
CHANGELOG.md Outdated Show resolved Hide resolved
specification/logs/api.md Outdated Show resolved Hide resolved
Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a nit comment/question, not a blocker.

pellared added a commit to open-telemetry/opentelemetry-go that referenced this pull request 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
```
@pellared pellared changed the title Logs API to have ergonomics for reusing standard attributes Logs API to have ergonomics for reusing Standard Attributes Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Status: In Review
Development

Successfully merging this pull request may close these issues.

Attributes "hell"
5 participants