crossposting here https discord com

crossposting here https://discord.com/channels/595317990191398933/1084418014763561091. Tldr; I'd like to make a custom http destination logpush, on the dashboard this doesn't seems to be an option, but the docs say it's possible and the api is available. When I tried the API it tell me that I exceeded the maximum job I can have (so 0). I'm just a little confused. What I'm trying to achieve basically is to get my worker logs in loki.
5 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Alaanor
AlaanorOP3y ago
That was the correct answer ! Sorry I wasn't careful about this one and it make sense now that I think about it. I got my logs pushed to loki now so I can confirm it works ! Thanks 🙏
betim
betim3y ago
hi @alaanor , I'm trying to set up the same. Anything you can share in terms of your configuration to make this work? I imagine some transformation is required to re-shape the trace events from workers into something that Loki is happy with?
Alaanor
AlaanorOP3y ago
https://github.com/pew/cloudflare-worker-logpush-loki#create-logpush-job basically this curl command but dataset set to workers_trace_events, and the header using Authorization: Bearer something fields=DispatchNamespace,Event,EventTimestampMs,EventType,Exceptions,Logs,Outcome,ScriptName,ScriptTags&timestamps=unixnano and the fields and I used the worker in this repo, it's just a single js file
betim
betim3y ago
great.. thanks!

Did you find this page helpful?