> DEFAULT_RESOURCE_ATTRIBUTES_FILTER =
attributeKey ->
- (attributeKey.equals(ResourceAttributes.SERVICE_NAME)
- || attributeKey.equals(ResourceAttributes.SERVICE_NAMESPACE)
- || attributeKey.equals(ResourceAttributes.SERVICE_INSTANCE_ID))
+ (attributeKey.equals(ServiceAttributes.SERVICE_NAME)
+ || attributeKey.equals(ServiceIncubatingAttributes.SERVICE_NAMESPACE)
+ || attributeKey.equals(ServiceIncubatingAttributes.SERVICE_INSTANCE_ID))
&& !attributeKey.getKey().isEmpty();
MetricConfiguration() {}
@@ -141,9 +142,9 @@ public final String getProjectId() {
* Returns the {@link Predicate} based filter that determines which resource attributes to add as
* metric labels.
*
- * The default filter adds {@link ResourceAttributes#SERVICE_NAME}, {@link
- * ResourceAttributes#SERVICE_NAMESPACE}, and {@link ResourceAttributes#SERVICE_INSTANCE_ID} as
- * metric labels.
+ *
The default filter adds {@link ServiceAttributes#SERVICE_NAME}, {@link
+ * ServiceIncubatingAttributes#SERVICE_NAMESPACE}, and {@link
+ * ServiceIncubatingAttributes#SERVICE_INSTANCE_ID} as metric labels.
*
* @return a {@link Predicate} that acts as a resource attribute filter.
* @see Builder#setResourceAttributesFilter(Predicate) for details.
diff --git a/exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java b/exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
index 24c9c7ba..7625e3f1 100644
--- a/exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
+++ b/exporters/metrics/src/test/java/com/google/cloud/opentelemetry/metric/FakeData.java
@@ -42,7 +42,10 @@
import io.opentelemetry.sdk.metrics.internal.data.ImmutableSumData;
import io.opentelemetry.sdk.metrics.internal.data.ImmutableSummaryPointData;
import io.opentelemetry.sdk.resources.Resource;
-import io.opentelemetry.semconv.ResourceAttributes;
+import io.opentelemetry.semconv.ServiceAttributes;
+import io.opentelemetry.semconv.incubating.CloudIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.HostIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
@@ -78,15 +81,15 @@ public class FakeData {
static final Attributes someGceAttributes =
Attributes.builder()
.put(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_COMPUTE_ENGINE)
- .put(ResourceAttributes.CLOUD_ACCOUNT_ID, aProjectId)
- .put(ResourceAttributes.HOST_ID, aHostId)
- .put(ResourceAttributes.CLOUD_AVAILABILITY_ZONE, aCloudZone)
- .put(ResourceAttributes.CLOUD_PROVIDER, "gcp")
- .put(ResourceAttributes.SERVICE_NAME, "test-gce-service")
- .put(ResourceAttributes.SERVICE_NAMESPACE, "test-gce-service-ns")
- .put(ResourceAttributes.SERVICE_INSTANCE_ID, "test-gce-service-id")
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_COMPUTE_ENGINE)
+ .put(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, aProjectId)
+ .put(HostIncubatingAttributes.HOST_ID, aHostId)
+ .put(CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, aCloudZone)
+ .put(CloudIncubatingAttributes.CLOUD_PROVIDER, "gcp")
+ .put(ServiceAttributes.SERVICE_NAME, "test-gce-service")
+ .put(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "test-gce-service-ns")
+ .put(ServiceIncubatingAttributes.SERVICE_INSTANCE_ID, "test-gce-service-id")
.put("extra_info", "extra")
.put("not_gcp_resource", "value")
.build();
diff --git a/exporters/trace/build.gradle b/exporters/trace/build.gradle
index 34f88968..ff347612 100644
--- a/exporters/trace/build.gradle
+++ b/exporters/trace/build.gradle
@@ -27,6 +27,7 @@ dependencies {
implementation platform(libraries.google_cloud_bom)
implementation platform(libraries.opentelemetry_bom)
implementation(libraries.opentelemetry_semconv)
+ implementation(libraries.opentelemetry_semconv_incubating)
implementation(project(':shared-resourcemapping'))
testImplementation(testLibraries.junit)
testImplementation(testLibraries.opentelemetry_sdk_testing)
diff --git a/exporters/trace/src/main/java/com/google/cloud/opentelemetry/trace/TraceVersions.java b/exporters/trace/src/main/java/com/google/cloud/opentelemetry/trace/TraceVersions.java
index c28f2ac9..528240fb 100644
--- a/exporters/trace/src/main/java/com/google/cloud/opentelemetry/trace/TraceVersions.java
+++ b/exporters/trace/src/main/java/com/google/cloud/opentelemetry/trace/TraceVersions.java
@@ -15,7 +15,7 @@
*/
package com.google.cloud.opentelemetry.trace;
-import static io.opentelemetry.semconv.ResourceAttributes.TELEMETRY_SDK_VERSION;
+import static io.opentelemetry.semconv.TelemetryAttributes.TELEMETRY_SDK_VERSION;
import io.opentelemetry.sdk.resources.Resource;
import java.util.Properties;
diff --git a/exporters/trace/src/test/java/com/google/cloud/opentelemetry/trace/TraceTranslatorTest.java b/exporters/trace/src/test/java/com/google/cloud/opentelemetry/trace/TraceTranslatorTest.java
index f88fceff..b552a4b0 100644
--- a/exporters/trace/src/test/java/com/google/cloud/opentelemetry/trace/TraceTranslatorTest.java
+++ b/exporters/trace/src/test/java/com/google/cloud/opentelemetry/trace/TraceTranslatorTest.java
@@ -35,7 +35,8 @@
import io.opentelemetry.sdk.testing.trace.TestSpanData;
import io.opentelemetry.sdk.trace.data.EventData;
import io.opentelemetry.sdk.trace.data.StatusData;
-import io.opentelemetry.semconv.ResourceAttributes;
+import io.opentelemetry.semconv.ServiceAttributes;
+import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -77,9 +78,9 @@ public void testInsertResourceAttributes() {
Resource resource =
Resource.create(
Attributes.builder()
- .put(ResourceAttributes.SERVICE_NAME, "my-service-name")
- .put(ResourceAttributes.SERVICE_NAMESPACE, "qa")
- .put(ResourceAttributes.SERVICE_INSTANCE_ID, "23")
+ .put(ServiceAttributes.SERVICE_NAME, "my-service-name")
+ .put(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "qa")
+ .put(ServiceIncubatingAttributes.SERVICE_INSTANCE_ID, "23")
.build());
TraceTranslator.insertResourceAttributes(resource, resourceAttributes);
assertTrue(resourceAttributes.containsKey("g.co/r/generic_task/job"));
diff --git a/shared/resourcemapping/build.gradle b/shared/resourcemapping/build.gradle
index 2e0d715d..0508724c 100644
--- a/shared/resourcemapping/build.gradle
+++ b/shared/resourcemapping/build.gradle
@@ -27,6 +27,7 @@ dependencies {
api(libraries.opentelemetry_sdk_common)
annotationProcessor(libraries.auto_value)
implementation(libraries.opentelemetry_semconv)
+ implementation(libraries.opentelemetry_semconv_incubating)
implementation platform(libraries.opentelemetry_bom)
testImplementation(testLibraries.junit5)
testImplementation(testLibraries.junit5_params)
diff --git a/shared/resourcemapping/src/main/java/com/google/cloud/opentelemetry/resource/ResourceTranslator.java b/shared/resourcemapping/src/main/java/com/google/cloud/opentelemetry/resource/ResourceTranslator.java
index 988613f1..00c6e677 100644
--- a/shared/resourcemapping/src/main/java/com/google/cloud/opentelemetry/resource/ResourceTranslator.java
+++ b/shared/resourcemapping/src/main/java/com/google/cloud/opentelemetry/resource/ResourceTranslator.java
@@ -17,7 +17,12 @@
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.sdk.resources.Resource;
-import io.opentelemetry.semconv.ResourceAttributes;
+import io.opentelemetry.semconv.ServiceAttributes;
+import io.opentelemetry.semconv.incubating.CloudIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.FaasIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.HostIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.K8sIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -48,7 +53,7 @@ public void fill(Resource resource, GcpResource.Builder builder) {
// for monitored resource types that have service.name, ignore it
// if its unknown_service in favor of a valid value in faas.name.
// if faas.name is also empty/unset use the ignored value from before.
- if (key.equals(ResourceAttributes.SERVICE_NAME)
+ if (key.equals(ServiceAttributes.SERVICE_NAME)
&& stringValue.startsWith(UNKNOWN_SERVICE_PREFIX)) {
continue;
}
@@ -56,10 +61,10 @@ public void fill(Resource resource, GcpResource.Builder builder) {
return;
}
}
- if (getOtelKeys().contains(ResourceAttributes.SERVICE_NAME)
- && Objects.nonNull(resource.getAttribute(ResourceAttributes.SERVICE_NAME))) {
+ if (getOtelKeys().contains(ServiceAttributes.SERVICE_NAME)
+ && Objects.nonNull(resource.getAttribute(ServiceAttributes.SERVICE_NAME))) {
builder.addResourceLabels(
- getLabelName(), resource.getAttribute(ResourceAttributes.SERVICE_NAME));
+ getLabelName(), resource.getAttribute(ServiceAttributes.SERVICE_NAME));
return;
}
fallbackLiteral().ifPresent(value -> builder.addResourceLabels(getLabelName(), value));
@@ -91,95 +96,102 @@ public static AttributeMapping create(
private static final List GCE_INSTANCE_LABELS =
Arrays.asList(
- AttributeMapping.create("zone", ResourceAttributes.CLOUD_AVAILABILITY_ZONE),
- AttributeMapping.create("instance_id", ResourceAttributes.HOST_ID));
+ AttributeMapping.create("zone", CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE),
+ AttributeMapping.create("instance_id", HostIncubatingAttributes.HOST_ID));
private static final List K8S_CONTAINER_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION)),
- AttributeMapping.create("cluster_name", ResourceAttributes.K8S_CLUSTER_NAME),
- AttributeMapping.create("namespace_name", ResourceAttributes.K8S_NAMESPACE_NAME),
- AttributeMapping.create("container_name", ResourceAttributes.K8S_CONTAINER_NAME),
- AttributeMapping.create("pod_name", ResourceAttributes.K8S_POD_NAME));
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION)),
+ AttributeMapping.create("cluster_name", K8sIncubatingAttributes.K8S_CLUSTER_NAME),
+ AttributeMapping.create("namespace_name", K8sIncubatingAttributes.K8S_NAMESPACE_NAME),
+ AttributeMapping.create("container_name", K8sIncubatingAttributes.K8S_CONTAINER_NAME),
+ AttributeMapping.create("pod_name", K8sIncubatingAttributes.K8S_POD_NAME));
private static final List K8S_POD_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION)),
- AttributeMapping.create("cluster_name", ResourceAttributes.K8S_CLUSTER_NAME),
- AttributeMapping.create("namespace_name", ResourceAttributes.K8S_NAMESPACE_NAME),
- AttributeMapping.create("pod_name", ResourceAttributes.K8S_POD_NAME));
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION)),
+ AttributeMapping.create("cluster_name", K8sIncubatingAttributes.K8S_CLUSTER_NAME),
+ AttributeMapping.create("namespace_name", K8sIncubatingAttributes.K8S_NAMESPACE_NAME),
+ AttributeMapping.create("pod_name", K8sIncubatingAttributes.K8S_POD_NAME));
private static final List K8S_NODE_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION)),
- AttributeMapping.create("cluster_name", ResourceAttributes.K8S_CLUSTER_NAME),
- AttributeMapping.create("node_name", ResourceAttributes.K8S_NODE_NAME));
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION)),
+ AttributeMapping.create("cluster_name", K8sIncubatingAttributes.K8S_CLUSTER_NAME),
+ AttributeMapping.create("node_name", K8sIncubatingAttributes.K8S_NODE_NAME));
private static final List K8S_CLUSTER_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION)),
- AttributeMapping.create("cluster_name", ResourceAttributes.K8S_CLUSTER_NAME));
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION)),
+ AttributeMapping.create("cluster_name", K8sIncubatingAttributes.K8S_CLUSTER_NAME));
private static final List AWS_EC2_INSTANCE_LABELS =
Arrays.asList(
- AttributeMapping.create("instance_id", ResourceAttributes.HOST_ID),
- AttributeMapping.create("region", ResourceAttributes.CLOUD_AVAILABILITY_ZONE),
- AttributeMapping.create("aws_account", ResourceAttributes.CLOUD_ACCOUNT_ID));
+ AttributeMapping.create("instance_id", HostIncubatingAttributes.HOST_ID),
+ AttributeMapping.create("region", CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE),
+ AttributeMapping.create("aws_account", CloudIncubatingAttributes.CLOUD_ACCOUNT_ID));
private static final List GOOGLE_CLOUD_APP_ENGINE_INSTANCE_LABELS =
Arrays.asList(
- AttributeMapping.create("module_id", ResourceAttributes.FAAS_NAME),
- AttributeMapping.create("version_id", ResourceAttributes.FAAS_VERSION),
- AttributeMapping.create("instance_id", ResourceAttributes.FAAS_INSTANCE),
- AttributeMapping.create("location", ResourceAttributes.CLOUD_REGION));
+ AttributeMapping.create("module_id", FaasIncubatingAttributes.FAAS_NAME),
+ AttributeMapping.create("version_id", FaasIncubatingAttributes.FAAS_VERSION),
+ AttributeMapping.create("instance_id", FaasIncubatingAttributes.FAAS_INSTANCE),
+ AttributeMapping.create("location", CloudIncubatingAttributes.CLOUD_REGION));
private static final List GENERIC_TASK_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION),
"global"),
- AttributeMapping.create("namespace", ResourceAttributes.SERVICE_NAMESPACE, ""),
+ AttributeMapping.create("namespace", ServiceIncubatingAttributes.SERVICE_NAMESPACE, ""),
AttributeMapping.create(
"job",
- Arrays.asList(ResourceAttributes.SERVICE_NAME, ResourceAttributes.FAAS_NAME),
+ Arrays.asList(ServiceAttributes.SERVICE_NAME, FaasIncubatingAttributes.FAAS_NAME),
""),
AttributeMapping.create(
"task_id",
Arrays.asList(
- ResourceAttributes.SERVICE_INSTANCE_ID, ResourceAttributes.FAAS_INSTANCE),
+ ServiceIncubatingAttributes.SERVICE_INSTANCE_ID,
+ FaasIncubatingAttributes.FAAS_INSTANCE),
""));
private static final List GENERIC_NODE_LABELS =
Arrays.asList(
AttributeMapping.create(
"location",
Arrays.asList(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, ResourceAttributes.CLOUD_REGION),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE,
+ CloudIncubatingAttributes.CLOUD_REGION),
"global"),
- AttributeMapping.create("namespace", ResourceAttributes.SERVICE_NAMESPACE, ""),
+ AttributeMapping.create("namespace", ServiceIncubatingAttributes.SERVICE_NAMESPACE, ""),
AttributeMapping.create(
"node_id",
- Arrays.asList(ResourceAttributes.HOST_ID, ResourceAttributes.HOST_NAME),
+ Arrays.asList(HostIncubatingAttributes.HOST_ID, HostIncubatingAttributes.HOST_NAME),
""));
/** Converts a Java OpenTelemetry SDK resource into a GCP resource. */
public static GcpResource mapResource(Resource resource) {
- String platform = resource.getAttribute(ResourceAttributes.CLOUD_PLATFORM);
+ String platform = resource.getAttribute(CloudIncubatingAttributes.CLOUD_PLATFORM);
if (platform == null) {
return mapK8sResourceOrGenericTaskOrNode(resource);
}
switch (platform) {
- case ResourceAttributes.CloudPlatformValues.GCP_COMPUTE_ENGINE:
+ case CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_COMPUTE_ENGINE:
return mapBase(resource, "gce_instance", GCE_INSTANCE_LABELS);
- case ResourceAttributes.CloudPlatformValues.AWS_EC2:
+ case CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EC2:
return mapBase(resource, "aws_ec2_instance", AWS_EC2_INSTANCE_LABELS);
- case ResourceAttributes.CloudPlatformValues.GCP_APP_ENGINE:
+ case CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_APP_ENGINE:
return mapBase(resource, "gae_instance", GOOGLE_CLOUD_APP_ENGINE_INSTANCE_LABELS);
default:
return mapK8sResourceOrGenericTaskOrNode(resource);
@@ -189,12 +201,12 @@ public static GcpResource mapResource(Resource resource) {
private static GcpResource mapK8sResourceOrGenericTaskOrNode(Resource resource) {
// if k8s.cluster.name is set, pattern match for various k8s resources.
// this will also match non-cloud k8s platforms like minikube.
- if (resource.getAttribute(ResourceAttributes.K8S_CLUSTER_NAME) != null) {
- if (resource.getAttribute(ResourceAttributes.K8S_CONTAINER_NAME) != null) {
+ if (resource.getAttribute(K8sIncubatingAttributes.K8S_CLUSTER_NAME) != null) {
+ if (resource.getAttribute(K8sIncubatingAttributes.K8S_CONTAINER_NAME) != null) {
return mapBase(resource, "k8s_container", K8S_CONTAINER_LABELS);
- } else if (resource.getAttribute(ResourceAttributes.K8S_POD_NAME) != null) {
+ } else if (resource.getAttribute(K8sIncubatingAttributes.K8S_POD_NAME) != null) {
return mapBase(resource, "k8s_pod", K8S_POD_LABELS);
- } else if (resource.getAttribute(ResourceAttributes.K8S_NODE_NAME) != null) {
+ } else if (resource.getAttribute(K8sIncubatingAttributes.K8S_NODE_NAME) != null) {
return mapBase(resource, "k8s_node", K8S_NODE_LABELS);
} else {
return mapBase(resource, "k8s_cluster", K8S_CLUSTER_LABELS);
@@ -205,10 +217,10 @@ private static GcpResource mapK8sResourceOrGenericTaskOrNode(Resource resource)
private static GcpResource genericTaskOrNode(Resource resource) {
Map, Object> attrMap = resource.getAttributes().asMap();
- if ((attrMap.containsKey(ResourceAttributes.SERVICE_NAME)
- || attrMap.containsKey(ResourceAttributes.FAAS_NAME))
- && (attrMap.containsKey(ResourceAttributes.SERVICE_INSTANCE_ID)
- || attrMap.containsKey(ResourceAttributes.FAAS_INSTANCE))) {
+ if ((attrMap.containsKey(ServiceAttributes.SERVICE_NAME)
+ || attrMap.containsKey(FaasIncubatingAttributes.FAAS_NAME))
+ && (attrMap.containsKey(ServiceIncubatingAttributes.SERVICE_INSTANCE_ID)
+ || attrMap.containsKey(FaasIncubatingAttributes.FAAS_INSTANCE))) {
return mapBase(resource, "generic_task", GENERIC_TASK_LABELS);
} else {
return mapBase(resource, "generic_node", GENERIC_NODE_LABELS);
diff --git a/shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java b/shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java
index 95cd9efd..9141ca67 100644
--- a/shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java
+++ b/shared/resourcemapping/src/test/java/com/google/cloud/opentelemetry/resource/ResourceTranslatorTest.java
@@ -21,7 +21,12 @@
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.sdk.resources.Resource;
-import io.opentelemetry.semconv.ResourceAttributes;
+import io.opentelemetry.semconv.ServiceAttributes;
+import io.opentelemetry.semconv.incubating.CloudIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.FaasIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.HostIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.K8sIncubatingAttributes;
+import io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes;
import java.util.AbstractMap.SimpleEntry;
import java.util.Collections;
import java.util.Map;
@@ -46,21 +51,23 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.GCP),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.GCP),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_KUBERNETES_ENGINE),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_KUBERNETES_ENGINE),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.HOST_ID, "GCE-instance-id"),
- new SimpleEntry<>(ResourceAttributes.HOST_NAME, "GCE-instance-name"),
- new SimpleEntry<>(ResourceAttributes.HOST_TYPE, "GCE-instance-type"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "GKE-testNameSpace"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "GKE-testHostName"),
- new SimpleEntry<>(ResourceAttributes.K8S_CONTAINER_NAME, "GKE-testContainerName")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_ID, "GCE-instance-id"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_NAME, "GCE-instance-name"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_TYPE, "GCE-instance-type"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "GKE-testNameSpace"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "GKE-testHostName"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_CONTAINER_NAME, "GKE-testContainerName")),
"k8s_container",
Map.ofEntries(
new SimpleEntry<>("location", "country-region-zone"),
@@ -71,16 +78,18 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AWS),
+ new SimpleEntry<>(
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AWS_EKS),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "EKS-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "EKS-pod-name"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "EKS-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "EKS-pod-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_CONTAINER_NAME, "EKS-container-name")),
+ K8sIncubatingAttributes.K8S_CONTAINER_NAME, "EKS-container-name")),
"k8s_container",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "EKS-cluster-name"),
@@ -91,17 +100,18 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER,
- ResourceAttributes.CloudProviderValues.AZURE),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AZURE),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AZURE_AKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AZURE_AKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "AKS-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "AKS-pod-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_CONTAINER_NAME, "AKS-container-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "AKS-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "AKS-pod-name"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_CONTAINER_NAME, "AKS-container-name")),
"k8s_container",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "AKS-cluster-name"),
@@ -112,13 +122,14 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
new SimpleEntry<>(
- ResourceAttributes.K8S_NAMESPACE_NAME, "non-cloud-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "non-cloud-pod-name"),
+ K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "non-cloud-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "non-cloud-pod-name"),
new SimpleEntry<>(
- ResourceAttributes.K8S_CONTAINER_NAME, "non-cloud-container-name")),
+ K8sIncubatingAttributes.K8S_CONTAINER_NAME, "non-cloud-container-name")),
"k8s_container",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "non-cloud-cluster-name"),
@@ -130,17 +141,18 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.GCP),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.GCP),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_KUBERNETES_ENGINE),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_KUBERNETES_ENGINE),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "GKE-testNameSpace"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "GKE-testHostName")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "GKE-testNameSpace"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "GKE-testHostName")),
"k8s_pod",
Map.ofEntries(
new SimpleEntry<>("location", "country-region-zone"),
@@ -150,15 +162,16 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AWS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AWS_EKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "EKS-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "EKS-pod-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "EKS-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "EKS-pod-name")),
"k8s_pod",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "EKS-cluster-name"),
@@ -168,16 +181,16 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER,
- ResourceAttributes.CloudProviderValues.AZURE),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AZURE),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AZURE_AKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AZURE_AKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NAMESPACE_NAME, "AKS-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "AKS-pod-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "AKS-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "AKS-pod-name")),
"k8s_pod",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "AKS-cluster-name"),
@@ -187,11 +200,12 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
new SimpleEntry<>(
- ResourceAttributes.K8S_NAMESPACE_NAME, "non-cloud-namespace-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_POD_NAME, "non-cloud-pod-name")),
+ K8sIncubatingAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_NAMESPACE_NAME, "non-cloud-namespace-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_POD_NAME, "non-cloud-pod-name")),
"k8s_pod",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "non-cloud-cluster-name"),
@@ -202,16 +216,17 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.GCP),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.GCP),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_KUBERNETES_ENGINE),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_KUBERNETES_ENGINE),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NODE_NAME, "GKE-node-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NODE_NAME, "GKE-node-name")),
"k8s_node",
Map.ofEntries(
new SimpleEntry<>("location", "country-region-zone"),
@@ -220,14 +235,15 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AWS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AWS_EKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NODE_NAME, "EKS-node-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NODE_NAME, "EKS-node-name")),
"k8s_node",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "EKS-cluster-name"),
@@ -236,15 +252,15 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER,
- ResourceAttributes.CloudProviderValues.AZURE),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AZURE),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AZURE_AKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AZURE_AKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NODE_NAME, "AKS-node-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NODE_NAME, "AKS-node-name")),
"k8s_node",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "AKS-cluster-name"),
@@ -253,9 +269,10 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
- new SimpleEntry<>(ResourceAttributes.K8S_NODE_NAME, "non-cloud-node-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_NODE_NAME, "non-cloud-node-name")),
"k8s_node",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "non-cloud-cluster-name"),
@@ -265,15 +282,16 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.GCP),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.GCP),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_KUBERNETES_ENGINE),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_KUBERNETES_ENGINE),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "GKE-cluster-name")),
"k8s_cluster",
Map.ofEntries(
new SimpleEntry<>("location", "country-region-zone"),
@@ -281,13 +299,14 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AWS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AWS_EKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "EKS-cluster-name")),
"k8s_cluster",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "EKS-cluster-name"),
@@ -295,14 +314,14 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER,
- ResourceAttributes.CloudProviderValues.AZURE),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AZURE),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AZURE_AKS),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AZURE_AKS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(K8sIncubatingAttributes.K8S_CLUSTER_NAME, "AKS-cluster-name")),
"k8s_cluster",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "AKS-cluster-name"),
@@ -310,8 +329,9 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(
+ K8sIncubatingAttributes.K8S_CLUSTER_NAME, "non-cloud-cluster-name")),
"k8s_cluster",
Map.ofEntries(
new SimpleEntry<>("cluster_name", "non-cloud-cluster-name"),
@@ -320,17 +340,18 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.GCP),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.GCP),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.GCP_COMPUTE_ENGINE),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.GCP_COMPUTE_ENGINE),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "GCE-pid"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.HOST_ID, "GCE-instance-id"),
- new SimpleEntry<>(ResourceAttributes.HOST_NAME, "GCE-instance-name"),
- new SimpleEntry<>(ResourceAttributes.HOST_TYPE, "GCE-instance-type")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_ID, "GCE-instance-id"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_NAME, "GCE-instance-name"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_TYPE, "GCE-instance-type")),
"gce_instance",
Map.ofEntries(
new SimpleEntry<>("instance_id", "GCE-instance-id"),
@@ -339,15 +360,16 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
generateOTelResourceMappingTestArgs(
Map.ofEntries(
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS),
+ CloudIncubatingAttributes.CLOUD_PROVIDER,
+ CloudIncubatingAttributes.CloudProviderIncubatingValues.AWS),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_PLATFORM,
- ResourceAttributes.CloudPlatformValues.AWS_EC2),
- new SimpleEntry<>(ResourceAttributes.CLOUD_ACCOUNT_ID, "aws-id"),
+ CloudIncubatingAttributes.CLOUD_PLATFORM,
+ CloudIncubatingAttributes.CloudPlatformIncubatingValues.AWS_EC2),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_ACCOUNT_ID, "aws-id"),
new SimpleEntry<>(
- ResourceAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
- new SimpleEntry<>(ResourceAttributes.CLOUD_REGION, "country-region"),
- new SimpleEntry<>(ResourceAttributes.HOST_ID, "aws-instance-id")),
+ CloudIncubatingAttributes.CLOUD_AVAILABILITY_ZONE, "country-region-zone"),
+ new SimpleEntry<>(CloudIncubatingAttributes.CLOUD_REGION, "country-region"),
+ new SimpleEntry<>(HostIncubatingAttributes.HOST_ID, "aws-instance-id")),
"aws_ec2_instance",
Map.ofEntries(
new SimpleEntry<>("region", "country-region-zone"),
@@ -356,10 +378,10 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
// test cases for generic_task
generateOTelResourceMappingTestArgs(
Map.ofEntries(
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAME, "my-service-prevailed"),
- new SimpleEntry<>(ResourceAttributes.FAAS_NAME, "my-service-ignored"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAMESPACE, "prod"),
- new SimpleEntry<>(ResourceAttributes.FAAS_INSTANCE, "1234")),
+ new SimpleEntry<>(ServiceAttributes.SERVICE_NAME, "my-service-prevailed"),
+ new SimpleEntry<>(FaasIncubatingAttributes.FAAS_NAME, "my-service-ignored"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "prod"),
+ new SimpleEntry<>(FaasIncubatingAttributes.FAAS_INSTANCE, "1234")),
"generic_task",
Map.ofEntries(
new SimpleEntry<>("job", "my-service-prevailed"),
@@ -368,10 +390,10 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
new SimpleEntry<>("location", "global"))),
generateOTelResourceMappingTestArgs(
Map.ofEntries(
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAME, "unknown_service_foo"),
- new SimpleEntry<>(ResourceAttributes.FAAS_NAME, "my-service-faas"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAMESPACE, "prod"),
- new SimpleEntry<>(ResourceAttributes.FAAS_INSTANCE, "1234")),
+ new SimpleEntry<>(ServiceAttributes.SERVICE_NAME, "unknown_service_foo"),
+ new SimpleEntry<>(FaasIncubatingAttributes.FAAS_NAME, "my-service-faas"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "prod"),
+ new SimpleEntry<>(FaasIncubatingAttributes.FAAS_INSTANCE, "1234")),
"generic_task",
Map.ofEntries(
new SimpleEntry<>("job", "my-service-faas"),
@@ -380,9 +402,9 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
new SimpleEntry<>("location", "global"))),
generateOTelResourceMappingTestArgs(
Map.ofEntries(
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAME, "unknown_service_foo"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAMESPACE, "prod"),
- new SimpleEntry<>(ResourceAttributes.FAAS_INSTANCE, "1234")),
+ new SimpleEntry<>(ServiceAttributes.SERVICE_NAME, "unknown_service_foo"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "prod"),
+ new SimpleEntry<>(FaasIncubatingAttributes.FAAS_INSTANCE, "1234")),
"generic_task",
Map.ofEntries(
new SimpleEntry<>("job", "unknown_service_foo"),
@@ -391,9 +413,9 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
new SimpleEntry<>("location", "global"))),
generateOTelResourceMappingTestArgs(
Map.ofEntries(
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAME, "my-service-name"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAMESPACE, "prod"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_INSTANCE_ID, "1234")),
+ new SimpleEntry<>(ServiceAttributes.SERVICE_NAME, "my-service-name"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "prod"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_INSTANCE_ID, "1234")),
"generic_task",
Map.ofEntries(
new SimpleEntry<>("job", "my-service-name"),
@@ -403,8 +425,8 @@ private static Stream provideOTelResourceAttributesToMonitoredResourc
// test cases for generic_node
generateOTelResourceMappingTestArgs(
Map.ofEntries(
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAME, "unknown_service"),
- new SimpleEntry<>(ResourceAttributes.SERVICE_NAMESPACE, "prod")),
+ new SimpleEntry<>(ServiceAttributes.SERVICE_NAME, "unknown_service"),
+ new SimpleEntry<>(ServiceIncubatingAttributes.SERVICE_NAMESPACE, "prod")),
"generic_node",
Map.ofEntries(
new SimpleEntry<>("namespace", "prod"),