groups:
  - id: aws
    prefix: aws
    type: span
    brief: >
      The `aws` conventions apply to operations using the AWS SDK. They map request or response parameters
      in AWS SDK API calls to attributes on a Span. The conventions have been collected over time based
      on feedback from AWS users of tracing and will continue to evolve as new interesting conventions
      are found.

      Some descriptions are also provided for populating general OpenTelemetry semantic conventions based on
      these APIs.
    attributes:
      - ref: rpc.system
        brief: "The value `aws-api`."
        requirement_level: required
        examples:
          - aws-api
      - ref: rpc.service
        brief: "The name of the service to which a request is made, as returned by the AWS SDK."
        examples:
          - DynamoDB
          - S3
      - ref: rpc.method
        brief: "The name of the operation corresponding to the request, as returned by the AWS SDK"
        examples:
          - GetItem
          - PutItem
      - ref: aws.request_id
        requirement_level: recommended

  - id: dynamodb.all
    type: span
    brief: "Attributes always filled for all DynamoDB request types."
    attributes:
      - ref: db.system
        brief: "The value `dynamodb`."
        requirement_level: required
        examples:
          - dynamodb

  - id: dynamodb.shared
    extends: aws
    type: span
    brief: "Attributes that exist for multiple DynamoDB request types."
    attributes:
      - ref: db.operation.name
        brief: "The same value as `rpc.method`."
        examples:
          - GetItem
          - PutItem
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_read_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_write_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.consistent_read
        requirement_level: recommended
      - ref: aws.dynamodb.projection
        requirement_level: recommended
      - ref: aws.dynamodb.limit
        requirement_level: recommended
      - ref: aws.dynamodb.attributes_to_get
        requirement_level: recommended
      - ref: aws.dynamodb.index_name
        requirement_level: recommended
      - ref: aws.dynamodb.select
        requirement_level: recommended

  - id: dynamodb.batchgetitem
    brief: DynamoDB.BatchGetItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended

  - id: dynamodb.batchwriteitem
    brief: DynamoDB.BatchWriteItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended

  - id: dynamodb.createtable
    brief: DynamoDB.CreateTable
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.global_secondary_indexes
        requirement_level: recommended
      - ref: aws.dynamodb.local_secondary_indexes
        requirement_level: recommended
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_read_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_write_capacity
        requirement_level: recommended

  - id: dynamodb.deleteitem
    brief: DynamoDB.DeleteItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended

  - id: dynamodb.deletetable
    brief: DynamoDB.DeleteTable
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users

  - id: dynamodb.describetable
    brief: DynamoDB.DescribeTable
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users

  - id: dynamodb.getitem
    brief: DynamoDB.GetItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.consistent_read
        requirement_level: recommended
      - ref: aws.dynamodb.projection
        requirement_level: recommended

  - id: dynamodb.listtables
    brief: DynamoDB.ListTables
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.exclusive_start_table
        requirement_level: recommended
      - ref: aws.dynamodb.table_count
        requirement_level: recommended
      - ref: aws.dynamodb.limit
        requirement_level: recommended

  - id: dynamodb.putitem
    brief: DynamoDB.PutItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended

  - id: dynamodb.query
    brief: DynamoDB.Query
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.scan_forward
        requirement_level: recommended
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.consistent_read
        requirement_level: recommended
      - ref: aws.dynamodb.limit
        requirement_level: recommended
      - ref: aws.dynamodb.projection
        requirement_level: recommended
      - ref: aws.dynamodb.attributes_to_get
        requirement_level: recommended
      - ref: aws.dynamodb.index_name
        requirement_level: recommended
      - ref: aws.dynamodb.select
        requirement_level: recommended

  - id: dynamodb.scan
    brief: DynamoDB.Scan
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.segment
        requirement_level: recommended
      - ref: aws.dynamodb.total_segments
        requirement_level: recommended
      - ref: aws.dynamodb.count
        requirement_level: recommended
      - ref: aws.dynamodb.scanned_count
        requirement_level: recommended
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.consistent_read
        requirement_level: recommended
      - ref: aws.dynamodb.limit
        requirement_level: recommended
      - ref: aws.dynamodb.projection
        requirement_level: recommended
      - ref: aws.dynamodb.attributes_to_get
        requirement_level: recommended
      - ref: aws.dynamodb.index_name
        requirement_level: recommended
      - ref: aws.dynamodb.select
        requirement_level: recommended

  - id: dynamodb.updateitem
    brief: DynamoDB.UpdateItem
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.item_collection_metrics
        requirement_level: recommended

  - id: dynamodb.updatetable
    brief: DynamoDB.UpdateTable
    extends: aws
    type: span
    attributes:
      - ref: aws.dynamodb.attribute_definitions
        requirement_level: recommended
      - ref: aws.dynamodb.global_secondary_index_updates
        requirement_level: recommended
      - ref: aws.dynamodb.table_names
        requirement_level: recommended
        brief: "A single-element array with the value of the TableName request parameter."
        examples:
          - Users
      - ref: aws.dynamodb.consumed_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_read_capacity
        requirement_level: recommended
      - ref: aws.dynamodb.provisioned_write_capacity
        requirement_level: recommended

  - id: aws.s3
    extends: aws
    type: span
    brief: "Attributes that exist for S3 request types."
    attributes:
      - ref: aws.s3.bucket
        requirement_level: recommended
      - ref: aws.s3.key
        requirement_level: recommended
      - ref: aws.s3.copy_source
        requirement_level: recommended
      - ref: aws.s3.upload_id
        requirement_level: recommended
      - ref: aws.s3.delete
        requirement_level: recommended
      - ref: aws.s3.part_number
        requirement_level: recommended
