Closed jaredpalmer closed 4 years ago
Blog posts
Got Athena working without a single line of code. Kinda cool
Some comments:
scarf
pulumi
for Infrastructure-as-Code, particularly as it has first-class TypeScript support (and more generally is an IaC provider that uses actual programming languages instead of config files). I could volunteer some time to create the Pulumi configuration for a set-up etc (I'm also an infrastructure engineer). Update: I have a working proof of concept with Cloudfront logging to an s3 bucket plus Athena. Not even sure QuickSight is worth it since I can just download the Athena query by csv.
This is the dopest analytics client of all time. All I'm doing is pinging my cloudfront distro
const fetch = require("isomorphic-unfetch");
const qs = require("qs");
const track = data =>
fetch(
"https://XXXXXX.XXXX.com?" +
qs.stringify({
tsdx_version: "v0.11.0",
ts_version: "v3.3.3",
node_version: "v10.6.3",
...data
})
)
.then(() => console.log("done"))
.catch(console.log);
// call it
track({ event: 'boop' });
and then in Athena....
I want to understand usage in more depth and want to add the option to opt-in analytics / telemetry in the cli when folks bootstrap a new project.
Questions I want answers to:
No I don’t want to read anyone’s code, just get some anonymous metadata that can inform us and everyone about directional usage trends. I will open source all aspects of the tracking code and backend.
Proposed Infrastructure Since it’s probably too controversial to use google analytics, we will roll it on our own. Luckily, this isn’t as bad as it sounds. Inside of the codebase, we just make a lil analytics client that sends simple GET requests with data as a query string to an AWS Cloudfront distro. We can then use S3 and Athena to transform the logs into usable metrics. We can the. embed stats on the future tsdx website I’m never going to finish 😉. We can also potentially use cube.js to make generating the react charts even easier.
Some possible architectures:
Or a simpler one:
(If we wanted to be cool AF, v2 could give folks the ability to see their own stats (wouldn’t be anonymous though))
Alternatives
Discussion