{"id":13615440,"url":"https://github.com/MacroPower/wakatime_exporter","last_synced_at":"2025-04-13T21:31:00.707Z","repository":{"id":65163374,"uuid":"281531401","full_name":"MacroPower/wakatime_exporter","owner":"MacroPower","description":"Exports Prometheus metrics from Wakatime.","archived":false,"fork":false,"pushed_at":"2023-02-15T03:45:23.000Z","size":3724,"stargazers_count":105,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T03:38:03.957Z","etag":null,"topics":["exported-metrics","go","golang","metrics","prometheus","prometheus-exporter","statistics","wakatime","wakatime-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MacroPower.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,"governance":null}},"created_at":"2020-07-22T00:08:50.000Z","updated_at":"2025-04-10T18:08:12.000Z","dependencies_parsed_at":"2023-12-03T20:41:16.518Z","dependency_job_id":null,"html_url":"https://github.com/MacroPower/wakatime_exporter","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"14edc53298e0e18e88dca2077b9c833b5c896a61"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacroPower%2Fwakatime_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacroPower%2Fwakatime_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacroPower%2Fwakatime_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacroPower%2Fwakatime_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacroPower","download_url":"https://codeload.github.com/MacroPower/wakatime_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248786079,"owners_count":21161393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["exported-metrics","go","golang","metrics","prometheus","prometheus-exporter","statistics","wakatime","wakatime-api"],"created_at":"2024-08-01T20:01:13.721Z","updated_at":"2025-04-13T21:30:57.419Z","avatar_url":"https://github.com/MacroPower.png","language":"Go","funding_links":[],"categories":["Time Tracking","Go"],"sub_categories":["Packages"],"readme":"\u003ca href=\"#\"\u003e\u003cimg src=\"docs/img/waka_header.png\"\u003e\u003c/a\u003e\n\n\u003ch2\u003e\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#\" target=\"blank\"\u003e\n    \u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/MacroPower/wakatime_exporter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/macropower/wakatime-exporter\" target=\"blank\"\u003e\n    \u003cimg alt=\"Docker Image Size (latest by date)\" src=\"https://img.shields.io/docker/image-size/macropower/wakatime-exporter?color=green\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/macropower/wakatime-exporter\" target=\"blank\"\u003e\n    \u003cimg alt=\"Docker Pulls\" src=\"https://img.shields.io/docker/pulls/macropower/wakatime-exporter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/MacroPower/wakatime_exporter\" target=\"blank\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/MacroPower/wakatime_exporter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/MacroPower/wakatime_exporter/maintainability\" target=\"blank\"\u003e\n    \u003cimg src=\"https://api.codeclimate.com/v1/badges/ed191a2b4937b9f87096/maintainability\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n_wakatime_exporter_ is a Prometheus exporter for [Wakatime](https://wakatime.com/) statistics.\nIt intends to extend the existing Wakatime ecosystem\nvia allowing users to make use of Prometheus (and therefore any consumers of its API)\nas companion services alongside the traditional Wakatime web application.\nThis could be anything from including some of your coding statistics in Grafana,\nto forecasting your coding time with prophet.\n\n\u003e NOTE: _wakatime_exporter_ is currently in ALPHA. Expect things to break and change.\n\n[Click here](docs/METRICS.md) to see an example of the exported metrics.\n\n[Click here](https://grafana.com/grafana/dashboards/12790) for a simple dashboard you can use to get started.\n\n\u003ca href=\"#\"\u003e\u003cimg src=\"docs/img/example.png\"\u003e\u003c/a\u003e\n\n## Usage\n\nIn most cases, you should only need to provide an API key.\nAll other parameters are for advanced use-cases only\nand you should be able to leave them set to their defaults.\n\nYou can get your Wakatime API key by visiting: https://wakatime.com/api-key\n\nProvide arguments via parameters:\n\n```text\nusage: wakatime_exporter --wakatime.api-key=WAKATIME.API-KEY [\u003cflags\u003e]\n\nFlags:\n  --help, -h                     Show context-sensitive help.\n  --collector.all-time           Enable the all-time collector (default: enabled).\n  --collector.goal               Enable the goal collector (default: enabled).\n  --collector.leader             Enable the leader collector (default: enabled).\n  --collector.summary            Enable the summary collector (default: enabled).\n  --collector.disable-defaults   Set all collectors to disabled by default.\n  --web.listen-address=\":9212\"   Address to listen on for web interface and telemetry.\n  --web.metrics-path=\"/metrics\"  Path under which to expose metrics.\n  --web.disable-exporter-metrics Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).\n  --wakatime.scrape-uri=\"https://wakatime.com/api/v1\"\n                                 Base path to query for Wakatime data.\n  --wakatime.user=\"current\"      User to query for Wakatime data.\n  --wakatime.api-key             Token to use when getting stats from Wakatime.\n  --wakatime.timeout=5s          Timeout for trying to get stats from Wakatime.\n  --wakatime.ssl-verify          Flag that enables SSL certificate verification for the scrape URI.\n  --log.level=info               Only log messages with the given severity or above.\n                                 One of: [debug, info, warn, error]\n  --log.format=logfmt            Output format of log messages.\n                                 One of: [logfmt, json]\n  --version                      Show application version.\n```\n\nand/or via environment variables:\n\n```shell\nWAKA_LISTEN_ADDRESS=\":9212\"                   # Address to listen on for web interface and telemetry.\nWAKA_METRICS_PATH=\"/metrics\"                  # Path under which to expose metrics.\nWAKA_SCRAPE_URI=\"https://wakatime.com/api/v1\" # Base path to query for Wakatime data.\nWAKA_USER=\"current\"                           # User to query for Wakatime data.\nWAKA_API_KEY=\"\"                               # Token to use when getting stats from Wakatime.\nWAKA_TIMEOUT=\"5s\"                             # Timeout for trying to get stats from Wakatime.\nWAKA_SSL_VERIFY=\"true\"                        # SSL certificate verification for the scrape URI.\nWAKA_DISABLE_EXPORTER_METRICS=\"false\"         # Exclude metrics about the exporter itself.\nWAKA_COLLECTOR_ALLTIME=\"true\"                 # Enable the all-time collector.\nWAKA_COLLECTOR_GOAL=\"true\"                    # Enable the goal collector.\nWAKA_COLLECTOR_LEADER=\"true\"                  # Enable the leader collector.\nWAKA_COLLECTOR_SUMMARY=\"true\"                 # Enable the summary collector.\n```\n\n## Docker\n\n```shell\ndocker run -p 9212:9212 macropower/wakatime-exporter:latest --wakatime.api-key=\"YOUR_API_KEY\"\n```\n\nOr use docker-compose:\n\n```shell\n# Linux \u0026 Darwin\nWAKA_API_KEY=\"YOUR_API_KEY\" docker-compose up\n```\n\n```powershell\n# Windows\n$env:WAKA_API_KEY=\"YOUR_API_KEY\"; docker-compose up\n```\n\n## Compatibility\n\n_wakatime_exporter_ is designed to work with [Wakatime](https://wakatime.com/).\nHowever, you can additionally use any other application\nthat is compliant with the [Wakatime API](https://wakatime.com/developers),\ne.g. [wakapi](https://github.com/muety/wakapi),\nvia `--wakatime.scrape-uri` or `WAKA_SCRAPE_URI`.\nIf said application only implements portions of the Wakatime API,\nyou can disable collectors for any non-compliant or non-existent endpoints\nusing parameters or environment variables as described in [usage](#usage).\n\n## License\n\nThis project was licensed GPL-2.0 from 0.0.0 to 0.0.5.\n\nAs of version 0.1.0, parts of this application use code from node_exporter, which is licensed APACHE 2.0.\n\nAs of version 0.1.0, this project in its entirety, excluding any packages found in vendor, is licensed APACHE 2.0.\nEach file in this project has a license header which identifies the copyright for said file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMacroPower%2Fwakatime_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMacroPower%2Fwakatime_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMacroPower%2Fwakatime_exporter/lists"}