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

a year 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

brody
EMPLOYEE

a year ago

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


purduemike
TRIALOP

a year ago

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


brody
EMPLOYEE

a year ago

this template looks compatible with what datadog expects -


brody
EMPLOYEE

a year ago

looks like it does work

1257907954145824800


brody
EMPLOYEE

a year ago

1257909073870061600


purduemike
TRIALOP

a year ago

What env vars did you set for locomotive?


brody
EMPLOYEE

a year ago

the datadog specific vars would be -

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

brody
EMPLOYEE

a year ago

are you having trouble with other vars?


purduemike
TRIALOP

a year ago

What other env vars did you set?


brody
EMPLOYEE

a year ago

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


purduemike
TRIALOP

a year ago

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


brody
EMPLOYEE

a year ago

how many logs does it say its sent?


purduemike
TRIALOP

a year ago

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


purduemike
TRIALOP

a year ago

or some UUID?


brody
EMPLOYEE

a year ago

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


brody
EMPLOYEE

a year ago

im using the uuid


purduemike
TRIALOP

a year ago

oh nm..i see the logs now!


brody
EMPLOYEE

a year ago

what was the issue?


purduemike
TRIALOP

a year ago

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


brody
EMPLOYEE

a year ago

why?


purduemike
TRIALOP

a year ago

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


purduemike
TRIALOP

a year ago

they are way to noisy


brody
EMPLOYEE

a year ago

how often would you want them to be printed?


purduemike
TRIALOP

a year ago

like once every 10 mins or never actually


brody
EMPLOYEE

a year ago

set REPORT_STATUS_EVERY=10m


purduemike
TRIALOP

a year ago

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


brody
EMPLOYEE

a year ago

thank you 🙂


Loading...