Skip to content

Instantly share code, notes, and snippets.

View austinlparker's full-sized avatar
🔭
otel me more

Austin Parker austinlparker

🔭
otel me more
View GitHub Profile
@austinlparker
austinlparker / env-helper.fish
Created July 19, 2024 01:57
A fish function that helps you synchronize .env files to and from a 1Password vault.
#!/usr/bin/env fish
# env-helper
# you'll need the 1Password CLI installed to use this
# change the vault name to whichever vault you want to use
function confirm
while true
read -p 'echo "Confirm (y/n):"' -l confirm
switch $confirm
@austinlparker
austinlparker / README.md
Last active October 31, 2024 06:59
OpenTelemetry Collector Log Parser for ATProto PDS

Parsing PDS Logs With OpenTelemetry

This configuration should parse your ATProto/Bluesky PDS logs into nicely formatted and structured OpenTelemetry Logs.

You'll need to use OpenTelemetry Collector Contrib, and you can either install it on your host or run it as a container (if running as a container, you'll need to map the Docker log path in as a read-only volume).

This also assumes that your Docker daemon.json has "tag": "{{.Name}}|{{.ImageName}}|{{.ID}}" set under log-opts (this is how we parse the container metadata).

As an exercise to the reader, you can use the count connector to parse the log stream into Prometheus or OTLP metrics. You can also add in hostmetrics receiver to get memory, CPU, disk, etc. utilization.

@austinlparker
austinlparker / userscript.js
Created December 16, 2024 15:36
hide reposts in bluesky following feed (arc boost/userscript)
// replace the <USER DISPLAY NAME> with the display name of the user you wish to hide reposts from in your following feed
function processElements() {
document.querySelectorAll('[aria-label="Reposted by <USER DISPLAY NAME>"]').forEach(element => {
let parent = element.parentElement;
while (parent) {
if (parent.tagName === 'DIV' && !parent.className) {
parent.className = 'hide';
break;
}
parent = parent.parentElement;