{"id":15345427,"url":"https://github.com/jthomas/cloud-functions-metrics-service","last_synced_at":"2026-04-24T21:33:26.836Z","repository":{"id":57200665,"uuid":"114995694","full_name":"jthomas/cloud-functions-metrics-service","owner":"jthomas","description":"This project uses IBM Cloud Monitoring to save metrics from IBM Cloud Functions","archived":false,"fork":false,"pushed_at":"2018-01-09T14:58:28.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T09:56:28.601Z","etag":null,"topics":["ibm-cloud-functions","metrics","monitoring","openwhisk","serverless"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-21T10:53:54.000Z","updated_at":"2018-08-13T02:56:21.000Z","dependencies_parsed_at":"2022-09-16T15:11:48.795Z","dependency_job_id":null,"html_url":"https://github.com/jthomas/cloud-functions-metrics-service","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jthomas/cloud-functions-metrics-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fcloud-functions-metrics-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fcloud-functions-metrics-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fcloud-functions-metrics-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fcloud-functions-metrics-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jthomas","download_url":"https://codeload.github.com/jthomas/cloud-functions-metrics-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthomas%2Fcloud-functions-metrics-service/sbom","scorecard":{"id":539999,"data":{"date":"2025-08-11","repo":{"name":"github.com/jthomas/cloud-functions-metrics-service","commit":"fe18bd1449bf25691e449888d25bc21e85b6515b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T07:58:27.160Z","repository_id":57200665,"created_at":"2025-08-20T07:58:27.160Z","updated_at":"2025-08-20T07:58:27.160Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ibm-cloud-functions","metrics","monitoring","openwhisk","serverless"],"created_at":"2024-10-01T11:13:23.090Z","updated_at":"2026-04-24T21:33:26.816Z","avatar_url":"https://github.com/jthomas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-functions-metrics-service\n\nThis project uses [IBM Cloud Monitoring](https://console.bluemix.net/catalog/services/monitoring) to save metrics from [IBM Cloud Functions](https://console.bluemix.net/openwhisk/).\n\nMetrics collected by the [openwhisk-metrics](https://github.com/jthomas/openwhisk-metrics) library are forwarded into the external monitoring service.\n\n## usage\n\nMetrics can be forwarded into IBM Cloud Monitoring in [real-time](#real-time-ingestion) or [sent in batches](#batch-ingestion) using a background process.\n\n- *Real-time ingestion ensures metrics appear immediately in the monitoring service.* Metrics forwarded using the batch ingestion won't be available until the next background task execution.\n- *Batch ingestion does not add any delay to action invocations.* Real-time ingestion saves invocation metrics each time the action handler is called. This adds a (small) delay to each invocation, where the library calls the external metrics service.\n\n### real-time ingestion\n\n- Install [OpenWhisk metrics](https://www.npmjs.com/package/openwhisk-metrics) and [IBM Cloud Monitoring service](https://www.npmjs.com/package/cloud-functions-metrics-service) libraries\n\n  ```\n  $ npm install openwhisk-metrics cloud-functions-metrics-service\n  ```\n\n- Wrap action handlers using external libraries\n\n  ```javascript\n  const metrics = require('openwhisk-metrics')\n  const service = require('cloud-functions-metrics-service')\n\n  metrics.service = service.client({  \n    host: 'metrics.ng.bluemix.net',\n    scope: '...',\n    api_key: '...'\n  })\n\n  const main = params =\u003e {\n    return { message: \"Hello World\" }\n  }\n\n  exports.main = metrics(main)\n  ```\n\n*Configuration options for the `openwhisk-metrics` library are available in the [project repository](https://github.com/jthomas/openwhisk-metrics).*\n\n*Configuration options for the [IBM Cloud Monitoring service](https://console.bluemix.net/docs/services/cloud-monitoring/monitoring_ov.html#monitoring_ov) are available in the [project repository](https://github.com/jthomas/ibm-cloud-monitoring).*\n\nMetrics forwarded using external real-time ingestion will not be logged to the console. If you want to enable this for debugging or testing, use this code snippet.\n\n```javascript\nconst client = service.client({  \n  host: 'metrics.ng.bluemix.net',\n  scope: '...',\n  api_key: '...'\n})\n\nconst log = metrics.service\n\nmetrics.service = values =\u003e {\n  log.save(values)\n  return client.save(values)\n}\n```\n\n### batch ingestion\n\n#### set up metric collectors\n\n- Set up action handlers with `openwhisk-metrics`\n\n  ```javascript\n  const metrics = require('openwhisk-metrics')\n\n  const main = params =\u003e {\n    return { message: \"Hello World\" }\n  }\n\n  module.exports.main = metrics(main) \n  ```\n\nAll actions you want to collect metrics for should use the library as above. Use the action names in the configuration below for the background task.\n\n#### create metric forwarder action\n\n- Download project repository\n\n  ```\n  $ git clone https://github.com/jthomas/cloud-functions-metrics-service\n  $ cd cloud-functions-metrics-service\n  ```\n\n\n- Create action deployment package.\n\n  ```\n  $ npm install\n  $ zip -r action.zip index.js package.json lib node_modules\n  ```\n\n- Fill in authentication parameters in action configuration file (`config.json`).\n\n  ```json\n  {\n    \"actions\": [\"action_names_to_monitor\"],\n    \"service\": {\n      \"host\": \"metrics.ng.bluemix.net\",\n      \"scope\": \"...\",\n      \"api_key\": \"...\"          \n    }\n  }\n  ```\n\n  *Configuration options for the [IBM Cloud Monitoring service](https://console.bluemix.net/docs/services/cloud-monitoring/monitoring_ov.html#monitoring_ov) are available in the [project repository](https://github.com/jthomas/ibm-cloud-monitoring).*\n\n- Create new OpenWhisk action from deployment package and configuration file.\n\n  ```\n  $ wsk action create metric-forwarder --kind nodejs:8 action.zip --param-file config.json\n  ```\n\n- Create trigger feed for alarm package to run `metric-forwarder` on periodic schedule. \n\n  ```\n  $ wsk trigger create interval \\\n    --feed /whisk.system/alarms/interval \\\n    --param minutes 10 \\\n  ```\n\n- Bind trigger to action using rule.\n\n  ```\n  $ wsk rule create forward-metrics-on-interval interval metric-forwarder\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fcloud-functions-metrics-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjthomas%2Fcloud-functions-metrics-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthomas%2Fcloud-functions-metrics-service/lists"}