Name: metrics-collector-client-python
Owner: International Business Machines
Description: Python version of the deployment tracker
Forked from: IBM-Cloud/cf-deployment-tracker-client-python
Created: 2017-09-13 04:31:07.0
Updated: 2018-01-22 18:49:09.0
Pushed: 2017-12-12 23:28:00.0
Homepage: https://pypi.python.org/pypi/metrics-tracker-client
Size: 923
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Metrics Collector Service collects statistics for deployment of a github sample code on Cloud Foundry, Kubernetes, Data Science Experience, OpenWhisk etc.
This is the source code for metrics_tracker_client, a pip package that can track and report details of a demo/tutorial.
Open a terminal and run
install metrics-tracker-client
Import the package at the entry point of your app and call the track()
function.
rt metrics_tracker_client
ics_tracker_client.track()
Add a copy of the Privacy Notice to the readme file.
Note: All apps that have deployment tracker must include the Privacy Notice.
Add a repository.yaml
file in the same directory of your main entry point files.
In your Jupyter Notebook, insert the following code in your entry point code block. Then, fill in the parameter in metrics_tracker_client.DSX()
with the format '<gitHub Organization>/<Repository name>'
.
install -q metrics-tracker-client
rt metrics_tracker_client
ics_tracker_client.DSX('org/repo')
Add a copy of the Privacy Notice to the readme file.
Note: All apps that have deployment tracker must include the Privacy Notice.
Add a repository.yaml
file in your GitHub's top-level repository.
The repository.yaml need to be written in Yaml format. Also, please put all your keys in lower case.
https://github.com/IBM/watson-discovery-news
imes:
Cloud Foundry
ices:
Discovery
t_id: web
t_organizer: dev-journeys
uage: python
Required field:
Please go to the service list page to get the list of official names for runtimes, services, and languages.
To see how to include this into your app please visit watson-online-store. You will want to pay attention to repository.yaml and run.py.
To see how to include this into your Jupyter Notebook please visit Integrate-Investment-Portfolio. You will want to pay attention to repository.yaml and SetupPortfolio.ipynb.
Sample web applications that include this package may be configured to track deployments to IBM Cloud and other platforms. The following information is sent to a Deployment Tracker service on each deployment:
application_name
)application_id
)instance_index
)space_id
) or OS usernameapplication_version
)application_uris
)cf_api
)This data is collected from the setup.py
and repository.yaml
file in the sample application and the VCAP_APPLICATION
and VCAP_SERVICES
environment variables in IBM Cloud and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Cloud to measure the usefulness of our examples, so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
Please see the README for the sample application that includes this package for instructions on disabling deployment tracking, as the instructions may vary based on the sample application in which this package is included.
See License.txt for license information.