Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
otezap: Add support for zap named loggers (#5896)
Add best effort handling for https://pkg.go.dev/go.uber.org/zap#Logger.Named No additional heap allocation: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/contrib/bridges/otelzap cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ CoreWrite/10_fields-16 534.0n ± 14% 484.4n ± 4% -9.29% (p=0.000 n=10) CoreWrite/20_fields-16 1.628µ ± 7% 1.448µ ± 28% -11.03% (p=0.000 n=10) CoreWrite/Namespace-16 1.147µ ± 4% 1.065µ ± 4% -7.11% (p=0.003 n=10) CoreWrite/With10_fields-16 169.5n ± 7% 139.1n ± 4% -17.99% (p=0.000 n=10) CoreWrite/With20_fields-16 365.7n ± 7% 355.9n ± 6% ~ (p=0.190 n=10) CoreWrite/WithNamespace-16 9.114n ± 14% 7.484n ± 3% -17.89% (p=0.000 n=10) geomean 287.4n 255.3n -11.17% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ CoreWrite/10_fields-16 978.0 ± 0% 978.0 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/20_fields-16 2.129Ki ± 0% 2.129Ki ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/Namespace-16 1.719Ki ± 0% 1.719Ki ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/With10_fields-16 208.0 ± 0% 208.0 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/With20_fields-16 640.0 ± 0% 640.0 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/WithNamespace-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ CoreWrite/10_fields-16 13.00 ± 0% 13.00 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/20_fields-16 22.00 ± 0% 22.00 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/Namespace-16 16.00 ± 0% 16.00 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/With10_fields-16 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/With20_fields-16 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ CoreWrite/WithNamespace-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean ```
- Loading branch information