macropower / wakatime_exporter Goto Github PK
View Code? Open in Web Editor NEWExports Prometheus metrics from Wakatime.
License: Apache License 2.0
Exports Prometheus metrics from Wakatime.
License: Apache License 2.0
level=info ts=2020-08-11T15:59:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=goals
level=info ts=2020-08-11T15:59:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=leaders
level=info ts=2020-08-11T15:59:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=summaries
level=info ts=2020-08-11T15:59:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=all_time_since_today
level=info ts=2020-08-11T15:59:47.729Z caller=main.go:139 msg="Collecting goals from Wakatime" total=4 pages=1
level=info ts=2020-08-11T15:59:47.840Z caller=main.go:144 msg="Collecting summary from Wakatime" obj=0 start="2020-08-11 04:00:00 +0000 UTC" end="2020-08-12 03:59:59 +0000 UTC" tz=America/New_York text=Today
level=info ts=2020-08-11T15:59:47.938Z caller=main.go:135 msg="Collecting rank from Wakatime" page=23 updated=2020-08-11T15:23:21Z
level=info ts=2020-08-11T15:59:47.942Z caller=main.go:138 msg="Collecting all time from Wakatime" IsUpToDate=true
level=info ts=2020-08-11T16:00:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=summaries
level=info ts=2020-08-11T16:00:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=leaders
level=info ts=2020-08-11T16:00:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=all_time_since_today
level=info ts=2020-08-11T16:00:47.554Z caller=utils.go:73 msg="Scraping Wakatime" date=2020-08-11 path=goals
level=info ts=2020-08-11T16:00:47.818Z caller=main.go:144 msg="Collecting summary from Wakatime" obj=0 start="2020-08-11 04:00:00 +0000 UTC" end="2020-08-12 03:59:59 +0000 UTC" tz=America/New_York text=Today
level=info ts=2020-08-11T16:00:48.530Z caller=main.go:138 msg="Collecting all time from Wakatime" IsUpToDate=true
level=info ts=2020-08-11T16:00:50.299Z caller=main.go:139 msg="Collecting goals from Wakatime" total=4 pages=1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a35c1]
For the total metric, switch to sourcing from the all_time_since_today endpoint. This is available for all users and means you will get some metrics pseudo-backfilled.
If I import the dashboard, I get the following error.
Templating init failed
invalid parameter "query": 1:94: parse error: missing unit character in duration
https://wakatime.com/developers#goals
# HELP wakatime_goal_info Information about the goal.
# TYPE wakatime_goal_info gauge
wakatime_goal_info{id="69e0febc-923e-4f67-b347-8ed4623823f0",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day in Go"} 1
wakatime_goal_info{id="b642abef-14eb-47c3-ae46-d61a46efe78c",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day in Go, Python"} 1
wakatime_goal_info{id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day"} 1
wakatime_goal_info{id="d8640746-23e6-4553-812a-716efca86020",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 6 hrs per week"} 1
# HELP wakatime_goal_progress_seconds_total Progress towards the goal.
# TYPE wakatime_goal_progress_seconds_total counter
wakatime_goal_progress_seconds_total{delta="day",id="69e0febc-923e-4f67-b347-8ed4623823f0",name="Code 1 hr per day in Go",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="day",id="b642abef-14eb-47c3-ae46-d61a46efe78c",name="Code 1 hr per day in Go, Python",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="day",id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",name="Code 1 hr per day",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="week",id="d8640746-23e6-4553-812a-716efca86020",name="Code 6 hrs per week",type="coding"} 69270.019606
# HELP wakatime_goal_seconds The goal.
# TYPE wakatime_goal_seconds gauge
wakatime_goal_seconds{delta="day",id="69e0febc-923e-4f67-b347-8ed4623823f0",name="Code 1 hr per day in Go",type="coding"} 3600
wakatime_goal_seconds{delta="day",id="b642abef-14eb-47c3-ae46-d61a46efe78c",name="Code 1 hr per day in Go, Python",type="coding"} 3600
wakatime_goal_seconds{delta="day",id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",name="Code 1 hr per day",type="coding"} 3600
wakatime_goal_seconds{delta="week",id="d8640746-23e6-4553-812a-716efca86020",name="Code 6 hrs per week",type="coding"} 21600
I think making the assumption that Wakatime always returns a sorted array was very wrong. The goals collector is clearly retrieving stats from a historical date, rather than the current one. Thus metrics are not working properly.
Wakatime already collects data related to branches for each project.
Would it be possible to add a new section in the dashboard with time spent on each branch with a projects filter that is automatically populated based on data received from Waka?
Hello, I'm not sure it sure it's the right place but I don't succeed to have data on my grafana. In first time I tried to use my own config but I ended up using your compose but I don't have any data on the grafana. Is there something I'm missing ?
I have a self-host wakapi instance running on docker, I modified the exporter config with WAKA_SCRAPE_URI: 'http://localhost:3000/api/compat/wakatime/v1'
, added my own api-key and modify the exposed port for grafana to avoid port conflict, but I still don't have any data on my grafana. Do you have any idea why ? I have good data on my selfhost wakapi instance.
Thank you for your consideration
Hello can you create an example docker stack how to use this ? I can't build it.
For compatibility with other services that might only implement portions of Wakatime's API.
e.g.
--exporter.collectors=alltime,summary
Should require at least one collector to be enabled.
Hey,
I wondered if this is still maintained?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.