Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ public AerospikeTags CreateAerospikeTags()
_ => new AerospikeV1Tags(),
};

public AwsDynamoDbTags CreateAwsDynamoDbTags() => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsDynamoDbTags(),
_ => new AwsDynamoDbV1Tags(),
};
public AwsDynamoDbTags CreateAwsDynamoDbTags() => new AwsDynamoDbTags();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,41 +78,17 @@ public MsmqTags CreateMsmqTags(string spanKind)
_ => new MsmqV1Tags(spanKind),
};

public AwsS3Tags CreateAwsS3Tags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsS3Tags(),
_ => new AwsS3V1Tags(spanKind),
};
public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags();
Copy link
Member

@lucaspimentel lucaspimentel Nov 5, 2025

Choose a reason for hiding this comment

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

These types all have constructors that take a spanKind, so we should pass that long.

Suggested change
public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags();
public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags(spanKind);

You already did this with AwsKinesisTags and AwsStepFunctionsTags below.


public AwsSqsTags CreateAwsSqsTags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsSqsTags(),
_ => new AwsSqsV1Tags(spanKind),
};
public AwsSqsTags CreateAwsSqsTags(string spanKind) => new AwsSqsTags();

public AwsSnsTags CreateAwsSnsTags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsSnsTags(),
_ => new AwsSnsV1Tags(spanKind),
};
public AwsSnsTags CreateAwsSnsTags(string spanKind) => new AwsSnsTags();

public AwsEventBridgeTags CreateAwsEventBridgeTags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsEventBridgeTags(),
_ => new AwsEventBridgeV1Tags(spanKind),
};
public AwsEventBridgeTags CreateAwsEventBridgeTags(string spanKind) => new AwsEventBridgeTags();

public AwsKinesisTags CreateAwsKinesisTags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsKinesisTags(spanKind),
_ => new AwsKinesisV1Tags(spanKind),
};
public AwsKinesisTags CreateAwsKinesisTags(string spanKind) => new AwsKinesisTags(spanKind);

public AwsStepFunctionsTags CreateAwsStepFunctionsTags(string spanKind) => _version switch
{
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsStepFunctionsTags(spanKind),
_ => new AwsStepFunctionsV1Tags(spanKind)
};
public AwsStepFunctionsTags CreateAwsStepFunctionsTags(string spanKind) => new AwsStepFunctionsTags(spanKind);

public RabbitMQTags CreateRabbitMqTags(string spanKind)
=> _version switch
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading