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

2 years ago

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?

27 Replies

2 years ago

does datadog have an ingest endpoint that accepts json log lines?


purduemike
PROOP

2 years ago

Yes, they have a http endpoint that accepts json logs. https://docs.datadoghq.com/api/latest/logs/#send-logs


2 years ago

this template looks compatible with what datadog expects -


2 years ago

looks like it does work

1257907954145824800


2 years ago

1257909073870061600


purduemike
PROOP

2 years ago

What env vars did you set for locomotive?


2 years ago

the datadog specific vars would be -

ADDITIONAL_HEADERS=DD-API-KEY=<dd>
INGEST_URL=https://http-intake.logs.datadoghq.com/api/v2/logs

2 years ago

are you having trouble with other vars?


purduemike
PROOP

2 years ago

What other env vars did you set?


2 years ago

besides those two, i set the other two it asks for, the train and the api key


purduemike
PROOP

2 years ago

Mine isn't forwarding logs. The locomotive logs are saying "The locomotive is chugging along.."


2 years ago

how many logs does it say its sent?


purduemike
PROOP

2 years ago

it hasn't said it sent any. Are you using just the name of the app ie. "MyApp" for TRAIN?


purduemike
PROOP

2 years ago

or some UUID?


2 years ago

it hasn't said it sent any
please check, expand the context


2 years ago

im using the uuid


purduemike
PROOP

2 years ago

oh nm..i see the logs now!


2 years ago

what was the issue?


purduemike
PROOP

2 years ago

need to figure out how to supress the "The locomotive is chugging along…" logs


2 years ago

why?


purduemike
PROOP

2 years ago

i was an idiot and had a filter on the DD dashboard


purduemike
PROOP

2 years ago

they are way to noisy


2 years ago

how often would you want them to be printed?


purduemike
PROOP

2 years ago

like once every 10 mins or never actually


2 years ago

set REPORT_STATUS_EVERY=10m


purduemike
PROOP

2 years ago

Thanks for your help Brody!! You're a life saver. I owe you a drink if you are ever in SF


2 years ago

thank you 🙂


Loading...