Metering and tracking usage for execution Java API

Before you use the execution Java™™ API, you must enable metering to track usage. Metering annotations allow you to track usage based on the limits that are defined on your Kubernetes container. You configure your Kubernetes containers that use the execution Java API by adding specific annotations that License Service uses to track usage.

Before you begin

Important: The following procedure is required only when you use IBM Decision Intelligence Client Managed Software with IBM Cloud Pak® for Business Automation entitlements. For more information, see Collecting and sending metrics to IBM Software Central.

License Service must be installed on your Kubernetes cluster where the containers that use the execution Java API are deployed. For information about the supported environment and installation instructions, see the ibm-licensing-operator External link opens a new window or tab section on GitHub.

For more information about License Service for IBM Cloud® Paks, see License Service External link opens a new window or tab.

Adding annotations for tracking usage

License Service processes pod annotations to track licenses. Specific metering annotations in the spec.template.metadata.annotations section of your Kubernetes pod template are used for the containers that use the execution Java API.

Add the following annotations depending on your deployment type:
  • Production deployment
  • Non production deployment
Annotations for production deployments:
spec:
   template:
   metadata:
      annotations:
         cloudpakId: "94a9c8c358bb43ba8fbdea62e7e166a5"
         cloudpakName: "IBM Cloud Pak for Business Automation"
         cloudpakVersion: "26.0.0"
         productMetric: "VIRTUAL_PROCESSOR_CORE"
         productVersion: "26.0.0"
         productID: "9b6d5e384f83481babe0cbd2430b313a"
         productName: "Decision Intelligence Client Managed Software - CP4BA"
         productCloudpakRatio: "1:4"
         productChargedContainers: <containername>
Annotations for non production deployments:
spec:
   template:
   metadata:
      annotations:
         cloudpakId: "94a9c8c358bb43ba8fbdea62e7e166a5"
         cloudpakName: "IBM Cloud Pak for Business Automation"
         cloudpakVersion: "26.0.0"
         productMetric: "VIRTUAL_PROCESSOR_CORE"
         productVersion: "26.0.0"
         productID: "5de74e64e8c141bcb2a950c8bb07d5c7"
         productName: "Decision Intelligence Client Managed Software - CP4BA - Non Prod"
         productCloudpakRatio: "1:2"
         productChargedContainers: <containername>

The name of the container must be set to <containername> as it is set in the spec.template.spec.containers.name parameter in your pod template.