1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/sdk/trace
Liz Fong-Jones 4491b39db2
sdk/trace: use slices.Grow() to avoid excessive runtime.growslice() (#4818)
* sdk/trace: use slices.Grow() to avoid excessive runtime.growslice()

* go1.20 compat

* update go.mod/sum

* Update CHANGELOG.md

* Revert "update go.mod/sum"

This reverts commit 1e4fcfa86c.

* inline slices.Grow as ensureAttributesCapacity

* fix comment

* add bench

* fix inlining

* Apply suggestions from code review

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>

* add ReportAllocs

* add benchmark variations with lower limit

* bugfix: we always want to set cap, just the value is a min()

* lint

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2024-01-12 13:42:36 -08:00
..
tracetest Use gofumpt instead of gofmt (#4623) 2023-10-16 10:02:21 -07:00
batch_span_processor_test.go Decouple use of otel/internal/internaltest (#4424) 2023-08-09 09:15:47 +02:00
batch_span_processor.go sdk/trace: Refine context cancellation in batchSpanProcessor.ForceFlush (#4369) 2023-07-27 10:05:52 +02:00
benchmark_test.go Use gofumpt instead of gofmt (#4623) 2023-10-16 10:02:21 -07:00
doc.go Prerelease v1.0.0 (#2250) 2021-09-20 13:02:46 -07:00
event.go chore: adds vanity import check. (#2255) 2021-09-27 22:37:26 -04:00
evictedqueue_test.go
evictedqueue.go Update span limits to comply with specification (#2637) 2022-03-03 07:56:07 -08:00
id_generator_test.go [SDK][Trace] Add tests for default id generator (#4043) 2023-05-15 07:18:43 -07:00
id_generator.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
link.go Removed dropped link's attributes field from API package (#2118) 2021-07-26 11:06:41 -04:00
provider_test.go Decouple use of otel/internal/internaltest (#4424) 2023-08-09 09:15:47 +02:00
provider.go Add embedded package to trace API (#4620) 2023-10-19 10:16:24 -07:00
sampler_env.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
sampling_test.go Update golangci-lint to v1.48.0 (#3105) 2022-08-24 21:42:28 -05:00
sampling.go sdk/trace: Fix ParentBased comment (#4604) 2023-10-13 19:51:11 +02:00
simple_span_processor_test.go styleguide: tests goroutine leaks and naming (#4348) 2023-07-24 09:35:06 +02:00
simple_span_processor.go Fixed race condition in OnEnd and added a unit test (#3951) 2023-04-14 07:23:47 -07:00
snapshot.go Deprecate Library and move all uses to Scope (#2977) 2022-07-06 14:55:46 -04:00
span_exporter.go docs(typos): Run codespell to fix typos (#3980) 2023-04-11 17:28:13 -07:00
span_limits_test.go Decouple use of otel/internal/internaltest (#4424) 2023-08-09 09:15:47 +02:00
span_limits.go Add godot linter to golangci (#2845) 2022-04-25 13:22:49 -07:00
span_processor_annotator_example_test.go Add SpanProcessor example for Span annotation on start (#1733) 2021-04-21 14:40:52 -04:00
span_processor_filter_example_test.go Use gofumpt instead of gofmt (#4623) 2023-10-16 10:02:21 -07:00
span_processor_test.go Handle nil testSpanProcessor (#2400) 2021-11-16 08:57:10 -08:00
span_processor.go Unify TracerProvider span processor lookups (#3942) 2023-04-01 07:57:35 -07:00
span_test.go sdk/trace: use slices.Grow() to avoid excessive runtime.growslice() (#4818) 2024-01-12 13:42:36 -08:00
span.go sdk/trace: use slices.Grow() to avoid excessive runtime.growslice() (#4818) 2024-01-12 13:42:36 -08:00
trace_test.go Upgrade use of semconv to v1.24.0 (#4754) 2024-01-11 12:56:07 +01:00
tracer.go Add embedded package to trace API (#4620) 2023-10-19 10:16:24 -07:00
util_test.go Rename WithDefaultSampler TracerProvider option to WithSampler and update docs (#1702) 2021-03-18 09:34:47 -07:00
version_test.go added version.go and test file for issue 2143 (#3677) 2023-05-09 08:29:19 -07:00
version.go added version.go and test file for issue 2143 (#3677) 2023-05-09 08:29:19 -07:00