Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes the double injection of Datadog trace ID in Figgy logs. #5984

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

tpendragon
Copy link
Contributor

@pulbot pulbot temporarily deployed to staging September 21, 2023 20:50 Inactive
@tpendragon
Copy link
Contributor Author

This makes logs look like this:

{"method":"GET","path":"/","format":"html","controller":"CatalogController","action":"index","status":200,"duration":104.29,"view":23.39,"db":2.27,"ddsource":["ruby"],"params":{},"sql_queries":"'Sequel::Postgres::Database (0.51) SELECT NULL\nSequel::Postgres::Database (0.31) SELECT NULL\nSequel::Postgres::Database (1.45) SELECT * FROM \"orm_resources\" WHERE (\"internal_resource\" = 'EphemeraProject')'","sql_queries_count":3,"@timestamp":"2023-09-21T20:53:44Z","@version":"1","message":"[200] GET / (CatalogController#index)"}

instead of

[dd.env=staging dd.service=figgy dd.trace_id=2193222659669475270 dd.span_id=0] {"method":"GET","path":"/","format":"html","controller":"CatalogController","action":"index","status":200,"duration":117.64,"view":53.31,"dd":{"trace_id":"2193222659669475270","span_id":"0","env":"staging","service":"figgy","version":""},"ddsource":["ruby"],"params":{},"sql_queries":"'Sequel::Postgres::Database (3.22) SELECT NULL\nSequel::Postgres::Database (9.61) SELECT NULL\nSequel::Postgres::Database (2.18) SELECT * FROM \"orm_resources\" WHERE (\"internal_resource\" = 'EphemeraProject')'","sql_queries_count":3,"@timestamp":"2023-09-21T20:51:53Z","@version":"1","message":"[200] GET / (CatalogController#index)"}

which lets datadog parse them.

@tpendragon tpendragon merged commit 1c85b13 into main Sep 21, 2023
@tpendragon tpendragon deleted the fix_figgy_json_logs branch September 21, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants