Import recommendation data into APM tools

Create a Prometheus scrape job to get data that you can import into APM tools

By creating a Prometheus scrape job, Optimize Live exports recommendation data as Prometheus metrics, which you can import into other application performance management (APM) tools.

To define a scrape job to get recommendation data:

  1. Edit the prometheus-server ConfigMap in the prometheus namespace:

    kubectl edit configmap -n prometheus prometheus-server
  2. Add the following scrape job to the scrape_configs: section of the ConfigMap.

    • Replace SF_CLIENT_ID with the clientID value in your cluster credential file.

    • Replace SF_CLIENT_SECRET with the clientSecret value in your cluster credential file.
      Alternatively, a Prometheus administrator can put the clientSecret in a file and leverage the client_secret_file parameter and specify the absolute path (for example, client_secret: /mnt/client_secret_file).

      - job_name: optimize-live-recommendations
        honor_labels: true
        proxy_from_environment: true
        scheme: https
          client_id: 'SF_CLIENT_ID'
          client_secret: 'SF_CLIENT_SECRET'
          token_url: ''
              audience: ''
              grantType: client_credentials
        metrics_path: /v3/workload-metrics
        - targets: [""]
  3. (Optional) To confirm that the scrape job is working as expected, compare the results in Prometheus to the output of the command below:

    curl -H "$(stormforge whoami --header)"
Last modified March 26, 2024