diff --git a/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go b/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go index d5d9a520acd3a..ebe1e1c37b69b 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go +++ b/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go @@ -74,6 +74,7 @@ func (d *Detector) Detect(ctx context.Context) (pdata.Resource, error) { attr := res.Attributes() attr.InsertString(conventions.AttributeCloudProvider, conventions.AttributeCloudProviderAWS) attr.InsertString("cloud.infrastructure_service", "EC2") + attr.InsertString("cloud.namespace", "ec2") attr.InsertString(conventions.AttributeCloudRegion, meta.Region) attr.InsertString(conventions.AttributeCloudAccount, meta.AccountID) attr.InsertString(conventions.AttributeCloudZone, meta.AvailabilityZone) diff --git a/processor/resourcedetectionprocessor/internal/aws/ec2/ec2_test.go b/processor/resourcedetectionprocessor/internal/aws/ec2/ec2_test.go index 5742cf08acb9f..2597ffb5d1efc 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ec2/ec2_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ec2/ec2_test.go @@ -136,6 +136,7 @@ func TestDetector_Detect(t *testing.T) { attr.InsertString("cloud.account.id", "account1234") attr.InsertString("cloud.provider", "aws") attr.InsertString("cloud.infrastructure_service", "EC2") + attr.InsertString("cloud.namespace", "ec2") attr.InsertString("cloud.region", "us-west-2") attr.InsertString("cloud.zone", "us-west-2a") attr.InsertString("host.id", "i-abcd1234") diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go index 5ca3e93ae914b..7709f443547a4 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go @@ -67,6 +67,7 @@ func (d *Detector) Detect(context.Context) (pdata.Resource, error) { attr := res.Attributes() attr.InsertString(conventions.AttributeCloudProvider, conventions.AttributeCloudProviderAWS) attr.InsertString("cloud.infrastructure_service", "ECS") + attr.InsertString("cloud.namespace", "ecs") attr.InsertString("aws.ecs.task.arn", tmdeResp.TaskARN) attr.InsertString("aws.ecs.task.family", tmdeResp.Family) diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go index c78f9c8668c48..9863bdddbabc5 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go @@ -115,6 +115,7 @@ func Test_ecsDetectV4(t *testing.T) { attr := want.Attributes() attr.InsertString("cloud.provider", "aws") attr.InsertString("cloud.infrastructure_service", "ECS") + attr.InsertString("cloud.namespace", "ecs") attr.InsertString("aws.ecs.cluster.arn", "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster") attr.InsertString("aws.ecs.task.arn", "arn:aws:ecs:us-west-2:123456789123:task/123") attr.InsertString("aws.ecs.task.family", "family") @@ -149,6 +150,7 @@ func Test_ecsDetectV3(t *testing.T) { attr := want.Attributes() attr.InsertString("cloud.provider", "aws") attr.InsertString("cloud.infrastructure_service", "ECS") + attr.InsertString("cloud.namespace", "ecs") attr.InsertString("aws.ecs.cluster.arn", "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster") attr.InsertString("aws.ecs.task.arn", "arn:aws:ecs:us-west-2:123456789123:task/123") attr.InsertString("aws.ecs.task.family", "family") diff --git a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk.go b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk.go index b406852fa8bd5..ee02aee660e13 100644 --- a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk.go +++ b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk.go @@ -79,6 +79,7 @@ func (d Detector) Detect(context.Context) (pdata.Resource, error) { attr := res.Attributes() attr.InsertString(conventions.AttributeCloudProvider, conventions.AttributeCloudProviderAWS) attr.InsertString("cloud.infrastructure_service", "ElasticBeanstalk") + attr.InsertString("cloud.namespace", "ElasticBeanstalk") attr.InsertString(conventions.AttributeServiceInstance, strconv.Itoa(ebmd.DeploymentID)) attr.InsertString(conventions.AttributeDeploymentEnvironment, ebmd.EnvironmentName) attr.InsertString(conventions.AttributeServiceVersion, ebmd.VersionLabel) diff --git a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk_test.go b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk_test.go index 8795e680f95d6..9571f117c5936 100644 --- a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/elasticbeanstalk_test.go @@ -100,6 +100,7 @@ func Test_AttributesDetectedSuccessfully(t *testing.T) { attr := want.Attributes() attr.InsertString("cloud.provider", "aws") attr.InsertString("cloud.infrastructure_service", "ElasticBeanstalk") + attr.InsertString("cloud.namespace", "ElasticBeanstalk") attr.InsertString("deployment.environment", "BETA") attr.InsertString("service.instance.id", "23") attr.InsertString("service.version", "env-version-1234")