Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semantic-conventions: Update to spec version 1.3.0 #547

Merged
merged 1 commit into from
May 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CRATE_DIR="${SCRIPT_DIR}/../"

# freeze the spec version and generator version to make generation reproducible
SPEC_VERSION=v1.1.0
SEMCOVGEN_VERSION=0.2.1
SPEC_VERSION=v1.3.0
SEMCOVGEN_VERSION=0.3.1

cd "$CRATE_DIR"

Expand Down
33 changes: 31 additions & 2 deletions opentelemetry-semantic-conventions/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub const CLOUD_REGION: Key = Key::from_static_str("cloud.region");
/// - us-east-1c
pub const CLOUD_AVAILABILITY_ZONE: Key = Key::from_static_str("cloud.availability_zone");

/// The cloud infrastructure resource in use.
/// The cloud platform in use.
///
/// The prefix of the service SHOULD match the one specified in `cloud.provider`.
///
Expand All @@ -68,7 +68,7 @@ pub const CLOUD_AVAILABILITY_ZONE: Key = Key::from_static_str("cloud.availabilit
/// - aws_ec2
/// - azure_vm
/// - gcp_compute_engine
pub const CLOUD_INFRASTRUCTURE_SERVICE: Key = Key::from_static_str("cloud.infrastructure_service");
pub const CLOUD_PLATFORM: Key = Key::from_static_str("cloud.platform");

/// The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
///
Expand Down Expand Up @@ -106,6 +106,14 @@ pub const AWS_ECS_TASK_ARN: Key = Key::from_static_str("aws.ecs.task.arn");
/// - opentelemetry-family
pub const AWS_ECS_TASK_FAMILY: Key = Key::from_static_str("aws.ecs.task.family");

/// The revision for this task definition.
///
/// # Examples
///
/// - 8
/// - 26
pub const AWS_ECS_TASK_REVISION: Key = Key::from_static_str("aws.ecs.task.revision");

/// The ARN of an EKS cluster.
///
/// # Examples
Expand Down Expand Up @@ -550,3 +558,24 @@ pub const TELEMETRY_SDK_VERSION: Key = Key::from_static_str("telemetry.sdk.versi
///
/// - 1.2.3
pub const TELEMETRY_AUTO_VERSION: Key = Key::from_static_str("telemetry.auto.version");

/// The name of the web engine.
///
/// # Examples
///
/// - WildFly
pub const WEBENGINE_NAME: Key = Key::from_static_str("webengine.name");

/// The version of the web engine.
///
/// # Examples
///
/// - 21.0.0
pub const WEBENGINE_VERSION: Key = Key::from_static_str("webengine.version");

/// Additional description of the web engine (e.g. detailed version and edition information).
///
/// # Examples
///
/// - WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final
pub const WEBENGINE_DESCRIPTION: Key = Key::from_static_str("webengine.description");
221 changes: 197 additions & 24 deletions opentelemetry-semantic-conventions/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const NET_PEER_PORT: Key = Key::from_static_str("net.peer.port");
///
/// # Examples
///
/// - IP.TCP
/// - ip_tcp
pub const NET_TRANSPORT: Key = Key::from_static_str("net.transport");

/// The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.
Expand Down Expand Up @@ -437,6 +437,7 @@ pub const NET_HOST_NAME: Key = Key::from_static_str("net.host.name");
/// - kafka
/// - rabbitmq
/// - activemq
/// - AmazonSQS
pub const MESSAGING_SYSTEM: Key = Key::from_static_str("messaging.system");

/// The message destination name. This might be equal to the span name but is required nevertheless.
Expand Down Expand Up @@ -620,9 +621,204 @@ pub const CODE_FILEPATH: Key = Key::from_static_str("code.filepath");
/// - 42
pub const CODE_LINENO: Key = Key::from_static_str("code.lineno");

/// The value `aws-api`.
///
/// # Examples
///
/// - aws-api
pub const RPC_SYSTEM: Key = Key::from_static_str("rpc.system");

/// The name of the service to which a request is made, as returned by the AWS SDK.
///
/// # Examples
///
/// - DynamoDB
/// - S3
pub const RPC_SERVICE: Key = Key::from_static_str("rpc.service");

/// The name of the operation corresponding to the request, as returned by the AWS SDK.
///
/// # Examples
///
/// - GetItem
/// - PutItem
pub const RPC_METHOD: Key = Key::from_static_str("rpc.method");

/// The keys in the `RequestItems` object field.
///
/// # Examples
///
/// - Users
/// - Cats
pub const AWS_DYNAMODB_TABLE_NAMES: Key = Key::from_static_str("aws.dynamodb.table_names");

/// The JSON-serialized value of each item in the `ConsumedCapacity` response field.
///
/// # Examples
///
/// - { "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": "string", "WriteCapacityUnits": number }
pub const AWS_DYNAMODB_CONSUMED_CAPACITY: Key =
Key::from_static_str("aws.dynamodb.consumed_capacity");

/// The JSON-serialized value of the `ItemCollectionMetrics` response field.
///
/// # Examples
///
/// - { "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }
pub const AWS_DYNAMODB_ITEM_COLLECTION_METRICS: Key =
Key::from_static_str("aws.dynamodb.item_collection_metrics");

/// The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
///
/// # Examples
///
/// - 1.0
/// - 2.0
pub const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: Key =
Key::from_static_str("aws.dynamodb.provisioned_read_capacity");

/// The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
///
/// # Examples
///
/// - 1.0
/// - 2.0
pub const AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: Key =
Key::from_static_str("aws.dynamodb.provisioned_write_capacity");

/// The value of the `ConsistentRead` request parameter.
pub const AWS_DYNAMODB_CONSISTENT_READ: Key = Key::from_static_str("aws.dynamodb.consistent_read");

/// The value of the `ProjectionExpression` request parameter.
///
/// # Examples
///
/// - Title
/// - Title, Price, Color
/// - Title, Description, RelatedItems, ProductReviews
pub const AWS_DYNAMODB_PROJECTION: Key = Key::from_static_str("aws.dynamodb.projection");

/// The value of the `Limit` request parameter.
///
/// # Examples
///
/// - 10
pub const AWS_DYNAMODB_LIMIT: Key = Key::from_static_str("aws.dynamodb.limit");

/// The value of the `AttributesToGet` request parameter.
///
/// # Examples
///
/// - lives
/// - id
pub const AWS_DYNAMODB_ATTRIBUTES_TO_GET: Key =
Key::from_static_str("aws.dynamodb.attributes_to_get");

/// The value of the `IndexName` request parameter.
///
/// # Examples
///
/// - name_to_group
pub const AWS_DYNAMODB_INDEX_NAME: Key = Key::from_static_str("aws.dynamodb.index_name");

/// The value of the `Select` request parameter.
///
/// # Examples
///
/// - ALL_ATTRIBUTES
/// - COUNT
pub const AWS_DYNAMODB_SELECT: Key = Key::from_static_str("aws.dynamodb.select");

/// The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.
///
/// # Examples
///
/// - { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
pub const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: Key =
Key::from_static_str("aws.dynamodb.global_secondary_indexes");

/// The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.
///
/// # Examples
///
/// - { "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }
pub const AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: Key =
Key::from_static_str("aws.dynamodb.local_secondary_indexes");

/// The value of the `ExclusiveStartTableName` request parameter.
///
/// # Examples
///
/// - Users
/// - CatsTable
pub const AWS_DYNAMODB_EXCLUSIVE_START_TABLE: Key =
Key::from_static_str("aws.dynamodb.exclusive_start_table");

/// The the number of items in the `TableNames` response parameter.
///
/// # Examples
///
/// - 20
pub const AWS_DYNAMODB_TABLE_COUNT: Key = Key::from_static_str("aws.dynamodb.table_count");

/// The value of the `ScanIndexForward` request parameter.
pub const AWS_DYNAMODB_SCAN_FORWARD: Key = Key::from_static_str("aws.dynamodb.scan_forward");

/// The value of the `Segment` request parameter.
///
/// # Examples
///
/// - 10
pub const AWS_DYNAMODB_SEGMENT: Key = Key::from_static_str("aws.dynamodb.segment");

/// The value of the `TotalSegments` request parameter.
///
/// # Examples
///
/// - 100
pub const AWS_DYNAMODB_TOTAL_SEGMENTS: Key = Key::from_static_str("aws.dynamodb.total_segments");

/// The value of the `Count` response parameter.
///
/// # Examples
///
/// - 10
pub const AWS_DYNAMODB_COUNT: Key = Key::from_static_str("aws.dynamodb.count");

/// The value of the `ScannedCount` response parameter.
///
/// # Examples
///
/// - 50
pub const AWS_DYNAMODB_SCANNED_COUNT: Key = Key::from_static_str("aws.dynamodb.scanned_count");

/// The JSON-serialized value of each item in the `AttributeDefinitions` request field.
///
/// # Examples
///
/// - { "AttributeName": "string", "AttributeType": "string" }
pub const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: Key =
Key::from_static_str("aws.dynamodb.attribute_definitions");

/// The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.
///
/// # Examples
///
/// - { "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
pub const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: Key =
Key::from_static_str("aws.dynamodb.global_secondary_index_updates");

/// A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.
pub const MESSAGING_OPERATION: Key = Key::from_static_str("messaging.operation");

/// RabbitMQ message routing key.
///
/// # Examples
///
/// - myKey
pub const MESSAGING_RABBITMQ_ROUTING_KEY: Key =
Key::from_static_str("messaging.rabbitmq.routing_key");

/// Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.
///
/// If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
Expand Down Expand Up @@ -657,29 +853,6 @@ pub const MESSAGING_KAFKA_PARTITION: Key = Key::from_static_str("messaging.kafka
/// A boolean that is true if the message is a tombstone.
pub const MESSAGING_KAFKA_TOMBSTONE: Key = Key::from_static_str("messaging.kafka.tombstone");

/// A string identifying the remoting system.
///
/// # Examples
///
/// - grpc
/// - java_rmi
/// - wcf
pub const RPC_SYSTEM: Key = Key::from_static_str("rpc.system");

/// The full name of the service being called, including its package name, if applicable.
///
/// # Examples
///
/// - myservice.EchoService
pub const RPC_SERVICE: Key = Key::from_static_str("rpc.service");

/// The name of the method being called, must be equal to the $method part in the span name.
///
/// # Examples
///
/// - exampleMethod
pub const RPC_METHOD: Key = Key::from_static_str("rpc.method");

/// The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.
///
/// # Examples
Expand Down