Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

migrating to the new metrics tracker client

Patrick Titzler edited this page Dec 5, 2017 · 6 revisions

Overview

Why you should consider migrating ASAP

  • The existing Deployment Tracker Service no longer stores deployment tracking information that the Node.js Deployment Tracker client you are using is sending.
  • Existing links to the deployment badge image and the "Deploy to IBM Cloud" image that you might have embedded in your README will be broken soon.

Disabling deployment tracking

Should you decide to not migrate to the new client, please disable deployment tracking:

  • Remove the call to require("cf-deployment-tracker-client").track();
  • Remove the cf-deployment-tracker-client dependency from your package.json
  • Update your README (links to the deployment stats badge, privacy notice, etc)

Migration steps

To migrate to the new tracking infrastructure:

  • Remove the deployment tracker Node.js client dependency from your application
    • Remove the call to require("cf-deployment-tracker-client").track();
    • Remove the cf-deployment-tracker-client dependency from your package.json
  • Add the metrics tracker Node.js client dependency to your application
    • Add the metrics-tracker-client dependency to your package.json
       npm install metrics-tracker-client --save
      
    • Add the tracking code to your application
      require("metrics-tracker-client").track();
      
    • Create a repository.yaml file in your project's root directory (refer to the readme for details and an example)
      id: <add_your_github_repository_url>
      runtimes: 
       - Cloud Foundry
      services: 
       - <utilized_IBM_Cloud_service_1>
       - <utilized_IBM_Cloud_service_2>
      event_id: web
      event_organizer: dev-journeys
      language: nodejs
      
  • Update your Deployment badge URLs and "Deploy to IBM Cloud" button URLs in your README.md
    • Deploy your application to IBM Cloud
    • Open https://metrics-tracker.mybluemix.net/stats and log in (access is restricted to IBM employees)
    • Locate your repository entry
    • Open the repository details page and note the new button/badge URLs
    • Update your existing README.md and other collateral with the designated URL/markdown code.

Note: The existing deployment statistics for your repository will not be migrated.