This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addEventListener("fetch", event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| async function handleRequest(request) { | |
| const token = getJwt(request) | |
| const payload = get_payload(token) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X "POST" "https://api.logflare.app/api/logs?source=YOUR_SOURCE_UUID" \ | |
| -H 'Content-Type: application/json' \ | |
| -H 'X-Api-Key: YOUR_INGEST_API_KEY' \ | |
| -d $'{ | |
| "batch": [ | |
| { | |
| "message": "A human readable event message!", | |
| "metadata": { | |
| "ip_address": "1.2.3.4", | |
| "datacenter": "aws", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X "POST" "https://api.logflare.app/logs/json?source=SOURCE_UUID" \ | |
| -H 'Content-Type: application/json; charset=utf-8' \ | |
| -H 'X-API-KEY: YOUR_API_KEY' \ | |
| -d $'[ | |
| { | |
| "yellow": true, | |
| "tags": [ | |
| "popular, tropical, organic" | |
| ], | |
| "store": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Enum.each(Process.list, fn pid -> | |
| case Process.info(pid)[:dictionary] do | |
| [_, "$initial_call": {:supervisor, DBConnection.ConnectionPool.Pool, _}] -> | |
| state = :sys.get_state(pid, 5000) | |
| case elem(state, 11) do | |
| {pid, _, Postgrex.Protocol, opts} -> | |
| if opts[:hostname] == "db.REDACTED.supabase.co" do | |
| IO.inspect({pid, state}) | |
| end | |
| _ -> nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| count(t0.id) as count, | |
| f2.path as path | |
| FROM | |
| edge_logs AS t0 | |
| INNER JOIN UNNEST(t0.metadata) AS f1 ON TRUE | |
| INNER JOIN UNNEST(f1.request) AS f2 ON TRUE | |
| INNER JOIN UNNEST(f2.headers) AS f3 ON TRUE | |
| WHERE | |
| AND (REGEXP_CONTAINS(f3.user_agent, 'ChatGPT-User')) |
OlderNewer