Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Instrumentation.AWS/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Set itinital capacity for AWS Semantic Convention Attribute Builder
([#2653](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2653))

## 1.11.1

Released 2025-Mar-05
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Instrumentation.AWSLambda/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Set itinital capacity for AWS Semantic Convention Attribute Builder
([#2653](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2653))

## 1.11.1

Released 2025-Mar-05
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Resources.AWS/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Set itinital capacity for AWS Semantic Convention Attribute Builder
([#2653](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2653))

## 1.11.1

Released 2025-Mar-05
Expand Down
6 changes: 5 additions & 1 deletion src/Shared/AWS/AWSSemanticConventions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ public ParameterMappingBuilderImpl AddAttributeAWSBedrockKnowledgeBaseId(string
public class AttributeBuilderImpl
{
private readonly AWSSemanticConventions awsSemanticConventions;
private List<KeyValuePair<string, object>> state = [];
private List<KeyValuePair<string, object>> state = new(

// set initial capacity to prevent array resizing
// and prevent #2652 - possible race condition when running from unit tests
capacity: 16);

public AttributeBuilderImpl(AWSSemanticConventions semanticConventions)
{
Expand Down
Loading