|
| 1 | +/* |
| 2 | + * Copyright The OpenTelemetry Authors |
| 3 | + * SPDX-License-Identifier: Apache-2.0 |
| 4 | + */ |
| 5 | + |
| 6 | +package io.opentelemetry.contrib.aws.resource; |
| 7 | + |
| 8 | +import io.opentelemetry.api.common.AttributeKey; |
| 9 | +import java.util.List; |
| 10 | + |
| 11 | +/** |
| 12 | + * Inlines incubating attributes until they are stable, doing this prevents having a direct |
| 13 | + * dependency on incubating artifact which can conflict with another incubating version. |
| 14 | + */ |
| 15 | +class IncubatingAttributes { |
| 16 | + private IncubatingAttributes() {} |
| 17 | + |
| 18 | + public static final AttributeKey<String> CLOUD_ACCOUNT_ID = |
| 19 | + AttributeKey.stringKey("cloud.account.id"); |
| 20 | + public static final AttributeKey<String> CLOUD_AVAILABILITY_ZONE = |
| 21 | + AttributeKey.stringKey("cloud.availability_zone"); |
| 22 | + public static final AttributeKey<String> CLOUD_PLATFORM = |
| 23 | + AttributeKey.stringKey("cloud.platform"); |
| 24 | + public static final AttributeKey<String> CLOUD_PROVIDER = |
| 25 | + AttributeKey.stringKey("cloud.provider"); |
| 26 | + public static final AttributeKey<String> CLOUD_REGION = AttributeKey.stringKey("cloud.region"); |
| 27 | + public static final AttributeKey<String> CLOUD_RESOURCE_ID = |
| 28 | + AttributeKey.stringKey("cloud.resource_id"); |
| 29 | + |
| 30 | + public static final class CloudPlatformValues { |
| 31 | + public static final String AWS_EC2 = "aws_ec2"; |
| 32 | + public static final String AWS_ECS = "aws_ecs"; |
| 33 | + public static final String AWS_EKS = "aws_eks"; |
| 34 | + public static final String AWS_LAMBDA = "aws_lambda"; |
| 35 | + public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; |
| 36 | + |
| 37 | + private CloudPlatformValues() {} |
| 38 | + } |
| 39 | + |
| 40 | + public static final class CloudProviderValues { |
| 41 | + public static final String AWS = "aws"; |
| 42 | + |
| 43 | + private CloudProviderValues() {} |
| 44 | + } |
| 45 | + |
| 46 | + public static final AttributeKey<String> SERVICE_INSTANCE_ID = |
| 47 | + AttributeKey.stringKey("service.instance.id"); |
| 48 | + public static final AttributeKey<String> SERVICE_NAMESPACE = |
| 49 | + AttributeKey.stringKey("service.namespace"); |
| 50 | + |
| 51 | + public static final AttributeKey<String> HOST_ID = AttributeKey.stringKey("host.id"); |
| 52 | + public static final AttributeKey<String> HOST_IMAGE_ID = AttributeKey.stringKey("host.image.id"); |
| 53 | + public static final AttributeKey<String> HOST_NAME = AttributeKey.stringKey("host.name"); |
| 54 | + public static final AttributeKey<String> HOST_TYPE = AttributeKey.stringKey("host.type"); |
| 55 | + |
| 56 | + public static final AttributeKey<String> CONTAINER_ID = AttributeKey.stringKey("container.id"); |
| 57 | + public static final AttributeKey<String> CONTAINER_IMAGE_NAME = |
| 58 | + AttributeKey.stringKey("container.image.name"); |
| 59 | + public static final AttributeKey<String> CONTAINER_NAME = |
| 60 | + AttributeKey.stringKey("container.name"); |
| 61 | + |
| 62 | + public static final AttributeKey<String> K8S_CLUSTER_NAME = |
| 63 | + AttributeKey.stringKey("k8s.cluster.name"); |
| 64 | + |
| 65 | + public static final AttributeKey<String> AWS_ECS_CONTAINER_ARN = |
| 66 | + AttributeKey.stringKey("aws.ecs.container.arn"); |
| 67 | + public static final AttributeKey<String> AWS_ECS_LAUNCHTYPE = |
| 68 | + AttributeKey.stringKey("aws.ecs.launchtype"); |
| 69 | + public static final AttributeKey<String> AWS_ECS_TASK_ARN = |
| 70 | + AttributeKey.stringKey("aws.ecs.task.arn"); |
| 71 | + public static final AttributeKey<String> AWS_ECS_TASK_FAMILY = |
| 72 | + AttributeKey.stringKey("aws.ecs.task.family"); |
| 73 | + public static final AttributeKey<String> AWS_ECS_TASK_REVISION = |
| 74 | + AttributeKey.stringKey("aws.ecs.task.revision"); |
| 75 | + public static final AttributeKey<List<String>> AWS_LOG_GROUP_ARNS = |
| 76 | + AttributeKey.stringArrayKey("aws.log.group.arns"); |
| 77 | + public static final AttributeKey<List<String>> AWS_LOG_GROUP_NAMES = |
| 78 | + AttributeKey.stringArrayKey("aws.log.group.names"); |
| 79 | + public static final AttributeKey<List<String>> AWS_LOG_STREAM_ARNS = |
| 80 | + AttributeKey.stringArrayKey("aws.log.stream.arns"); |
| 81 | + public static final AttributeKey<List<String>> AWS_LOG_STREAM_NAMES = |
| 82 | + AttributeKey.stringArrayKey("aws.log.stream.names"); |
| 83 | + |
| 84 | + public static final AttributeKey<String> FAAS_NAME = AttributeKey.stringKey("faas.name"); |
| 85 | + public static final AttributeKey<String> FAAS_VERSION = AttributeKey.stringKey("faas.version"); |
| 86 | +} |
0 commit comments