Skip to content

Commit 4c2476b

Browse files
Removing V1 tags class from AWS integrations (#7746)
## Summary of changes - Removed classes Aws{Service}V1Tags (such as AWSS3V1Tags) from Datadog.Trace.Tagging. - Removed accompanying usages of the classes in MessagingSchema and unit tests. - Added PeerService and PeerServiceSource tags to AwsSDKTags. - Deletion of Aws{Service}V1 snapshots and removal of V1 schema from Aws managed service integration tests ## Reason for change Cleanup of unused V1 code. Preparation for follow up PR addressing Serverless Service Representation for AWS Managed Services, which requires the V0 schema for these services to have access to the peer service and peer service source tags to hardcode their values in serverless environments. ## Implementation details - Added PeerService and PeerServiceSource tags in Datadog.Trace/src/Datadog.Trace/Tagging/AwsSdkTags.cs - Removed classes AwsEventBridgeV1Tags, AwsKinesisV1Tags, AwsS3V1Tags, AwsSnsV1Tags, AwsSqsV1Tags, AwsStepFunctionsV1Tags. - Edited MessagingSchema and DatabaseSchema to not use the deleted classes in the CreateAws{Service}Tags() functions - Did same as above for MessagingSchema unit tests - Deleted V1 snapshots and any uses of V1 in the integration tests for AWS managed services. ## Test coverage ## Other details <!-- Fixes #{issue} --> <!-- ⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. --> --------- Co-authored-by: Lucas Pimentel <[email protected]>
1 parent 24c865f commit 4c2476b

File tree

79 files changed

+256
-12327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+256
-12327
lines changed

tracer/src/Datadog.Trace/Configuration/Schema/DatabaseSchema.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ public AerospikeTags CreateAerospikeTags()
9595
_ => new AerospikeV1Tags(),
9696
};
9797

98-
public AwsDynamoDbTags CreateAwsDynamoDbTags() => _version switch
99-
{
100-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsDynamoDbTags(),
101-
_ => new AwsDynamoDbV1Tags(),
102-
};
98+
public AwsDynamoDbTags CreateAwsDynamoDbTags() => new AwsDynamoDbTags();
10399
}
104100
}

tracer/src/Datadog.Trace/Configuration/Schema/MessagingSchema.cs

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,41 +78,17 @@ public MsmqTags CreateMsmqTags(string spanKind)
7878
_ => new MsmqV1Tags(spanKind),
7979
};
8080

81-
public AwsS3Tags CreateAwsS3Tags(string spanKind) => _version switch
82-
{
83-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsS3Tags(),
84-
_ => new AwsS3V1Tags(spanKind),
85-
};
81+
public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags(spanKind);
8682

87-
public AwsSqsTags CreateAwsSqsTags(string spanKind) => _version switch
88-
{
89-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsSqsTags(),
90-
_ => new AwsSqsV1Tags(spanKind),
91-
};
83+
public AwsSqsTags CreateAwsSqsTags(string spanKind) => new AwsSqsTags(spanKind);
9284

93-
public AwsSnsTags CreateAwsSnsTags(string spanKind) => _version switch
94-
{
95-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsSnsTags(),
96-
_ => new AwsSnsV1Tags(spanKind),
97-
};
85+
public AwsSnsTags CreateAwsSnsTags(string spanKind) => new AwsSnsTags(spanKind);
9886

99-
public AwsEventBridgeTags CreateAwsEventBridgeTags(string spanKind) => _version switch
100-
{
101-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsEventBridgeTags(),
102-
_ => new AwsEventBridgeV1Tags(spanKind),
103-
};
87+
public AwsEventBridgeTags CreateAwsEventBridgeTags(string spanKind) => new AwsEventBridgeTags(spanKind);
10488

105-
public AwsKinesisTags CreateAwsKinesisTags(string spanKind) => _version switch
106-
{
107-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsKinesisTags(spanKind),
108-
_ => new AwsKinesisV1Tags(spanKind),
109-
};
89+
public AwsKinesisTags CreateAwsKinesisTags(string spanKind) => new AwsKinesisTags(spanKind);
11090

111-
public AwsStepFunctionsTags CreateAwsStepFunctionsTags(string spanKind) => _version switch
112-
{
113-
SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsStepFunctionsTags(spanKind),
114-
_ => new AwsStepFunctionsV1Tags(spanKind)
115-
};
91+
public AwsStepFunctionsTags CreateAwsStepFunctionsTags(string spanKind) => new AwsStepFunctionsTags(spanKind);
11692

11793
public RabbitMQTags CreateRabbitMqTags(string spanKind)
11894
=> _version switch

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AwsDynamoDbV1Tags.g.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AwsEventBridgeV1Tags.g.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AwsKinesisV1Tags.g.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TagListGenerator/AwsS3V1Tags.g.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)