R
Railwayβ€’5mo ago
purduemike

What is the best way to forward all of my logs from a railway project to datadog?

What is the best way to forward all of my logs from a railway project (python app, redis, postgres, etc) to datadog? Do you have a way to pull that from your api and push to DD?
Solution:
this template looks compatible with what datadog expects - https://railway.app/template/jP9r-f...
Jump to solution
24 Replies
Percy
Percyβ€’5mo ago
Project ID: N/A
Brody
Brodyβ€’5mo ago
does datadog have an ingest endpoint that accepts json log lines?
purduemike
purduemikeOPβ€’5mo ago
Yes, they have a http endpoint that accepts json logs. https://docs.datadoghq.com/api/latest/logs/#send-logs
Datadog Infrastructure and Application Monitoring
Logs
Datadog, the leading service for cloud-scale monitoring.
Solution
Brody
Brodyβ€’5mo ago
this template looks compatible with what datadog expects - https://railway.app/template/jP9r-f
Brody
Brodyβ€’5mo ago
looks like it does work
No description
Brody
Brodyβ€’5mo ago
No description
purduemike
purduemikeOPβ€’5mo ago
What env vars did you set for locomotive?
Brody
Brodyβ€’5mo ago
the datadog specific vars would be -
ADDITIONAL_HEADERS=DD-API-KEY=<dd api key>
INGEST_URL=https://http-intake.logs.datadoghq.com/api/v2/logs
ADDITIONAL_HEADERS=DD-API-KEY=<dd api key>
INGEST_URL=https://http-intake.logs.datadoghq.com/api/v2/logs
are you having trouble with other vars?
purduemike
purduemikeOPβ€’5mo ago
What other env vars did you set?
Brody
Brodyβ€’5mo ago
besides those two, i set the other two it asks for, the train and the api key
purduemike
purduemikeOPβ€’5mo ago
Mine isn't forwarding logs. The locomotive logs are saying "The locomotive is chugging along.."
Brody
Brodyβ€’5mo ago
how many logs does it say its sent?
purduemike
purduemikeOPβ€’5mo ago
it hasn't said it sent any. Are you using just the name of the app ie. "MyApp" for TRAIN? or some UUID?
Brody
Brodyβ€’5mo ago
it hasn't said it sent any
please check, expand the context im using the uuid
purduemike
purduemikeOPβ€’5mo ago
oh nm..i see the logs now!
Brody
Brodyβ€’5mo ago
what was the issue?
purduemike
purduemikeOPβ€’5mo ago
need to figure out how to supress the "The locomotive is chugging along..." logs
Brody
Brodyβ€’5mo ago
why?
purduemike
purduemikeOPβ€’5mo ago
i was an idiot and had a filter on the DD dashboard they are way to noisy
Brody
Brodyβ€’5mo ago
how often would you want them to be printed?
purduemike
purduemikeOPβ€’5mo ago
like once every 10 mins or never actually
Brody
Brodyβ€’5mo ago
set REPORT_STATUS_EVERY=10m
purduemike
purduemikeOPβ€’5mo ago
Thanks for your help Brody!! You're a life saver. I owe you a drink if you are ever in SF
Brody
Brodyβ€’5mo ago
thank you πŸ™‚
Want results from more Discord servers?
Add your server