groups:
  - id: metric.azure.cosmosdb.client.operation.request_charge
    type: metric
    metric_name: azure.cosmosdb.client.operation.request_charge
    brief: "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation"
    instrument: histogram
    unit: "{request_unit}"
    stability: development
    extends: attributes.azure.cosmosdb.minimal
    attributes:
      - ref: azure.cosmosdb.operation.contacted_regions
        requirement_level:
          recommended: If available

  - id: metric.azure.cosmosdb.client.active_instance.count
    type: metric
    metric_name: azure.cosmosdb.client.active_instance.count
    brief: "Number of active client instances"
    instrument: updowncounter
    unit: "{instance}"
    stability: development
    attributes:
      # TODO: add db.system once https://github.com/open-telemetry/build-tools/issues/192 is possible
      # - ref: db.system.name
      #   requirement_level:
      #     conditionally_required: if available
      - ref: server.address
        brief: >
          Name of the database host.
      - ref: server.port
        requirement_level:
          conditionally_required: If using a port other than the default port for this DBMS and if `server.address` is set.
