You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
For context, we are using an opinionated logger, that only allows to inject
ddin{"context":{"dd":{...}}}Meanwhile, DataDog injects them to the top level object:
If left there, the resulting log message will be printed without
dd:{"context":{"reqId":"488fb75c-873b-4f14-9026-69301a3bba9b","program":"@contra/contra-api","logLevel":30,"responseTime":140.2810000181198,"response":{"statusCode":200}},"message":"request completed","sequence":"10.11","time":1648137086856,"version":"2.0.0"}We could move it to
context.ddand then the logs would get printed as expected:{ "context": { "dd": { "trace_id": "3255415553032845221", "span_id": "3255415553032845221", "service": "ts-node", "version": "10.4.0" }, "reqId": "488fb75c-873b-4f14-9026-69301a3bba9b", "program": "@contra/contra-api", "logLevel": 30, "responseTime": 140.2810000181198, "response": { "statusCode": 200 } }, "message": "request completed", "sequence": "10.11", "time": 1648137086856, "version": "2.0.0" }Is there a way to configure datadog-agent to read
ddcontext from there?Beta Was this translation helpful? Give feedback.
All reactions