Closed tkmsaaaam closed 3 months ago
Fix https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/340 's bug.
Use appropriate CLOUD_PROVIDER . Add test cases about GCP . Fix to map resource when platform == null Regarding use of appropriate cloud provider, I think GCP is correct, since GCP has Monitored Resource types for other cloud providers like AWS too.
If it is true. I don't need changes about below. I will fix it.
1. Use appropriate CLOUD_PROVIDER .
Thank you for the clarification, I will review this shortly!
Thanks for reporting and fixing this bug! Could you address the last pending comment
Thanks for your review. I've done it.
/gcbrun
Fix #340 's bug. Use appropriate CLOUD_PROVIDER . Add test cases about GCP . Fix to map resource when platform == null Regarding use of appropriate cloud provider, I think GCP is correct, since GCP has Monitored Resource types for other cloud providers like AWS too.
If it is true. I don't need changes about below. I will fix it.
1. Use appropriate CLOUD_PROVIDER .
For posterity, the CLOUD_PROVIDER
resource attribute is not added to the MR resource, as such its value does not affect the mapped resource. However, the more appropriate CLOUD_PROVIDER
values should be specific to the CLOUD_PLATFORM
as indicated by the tests in this PR.
Fix #340 's bug.
I made bellow changes.
1. Use appropriate
CLOUD_PROVIDER
.shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java
All or most of test case'sCLOUD_PROVIDER
areGCP
. But I think it is not correct. It should map bellow.GCP_KUBERNETES_ENGINE
thenGCP
AZURE_AKS
thenAZURE
AWS_EKS
thenAWS
CLOUD_PROVIDER
in most of cases.2. Use appropriate
CLOUD_PLATFORM
.shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java
All or mostnon-cloud
test case'sCLOUD_PLATFORM
areAZURE_AKS
. But it should be no keys and values.3. Add test cases about
GCP
.4. Fix to map resource when
platform == null
I have to map to k8s resources when this condition. If i did this.
Then I need duplicate these lines https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/342/files#diff-992354fc4c9a5bcfac13812fb9e420d0498483ae56b986f25e71d6649386de99L187-L198 . So I make
mapK8sResourceOrGenericTaskOrNode
to refactor it.