-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 10.10
-
Fix Version/s: HOTFIX_10.10, 11.x
-
Component/s: Infrastructure
-
Tags:
-
Team:PLATFORM
When enabling JSON logging, some logs are not well forwarded and analyzed in tools like Datadog.
we end up with the following message:
{ "id": "AQAAAXORYTaR-jvaxAAAAABBWE9SWVRkM0tzZWh6VG4zZVlBQQ", "content": { "timestamp": "2020-07-27T17:45:34.097Z", "tags": [ "service:nuxeo", "source:nuxeo", ], "host": "fifthsun-prod-nuxp-230-10-4-7-151-usw", "service": "fifthsun-230", "message": "2020-07-27 17:45:33,411 INFO [http-nio-0.0.0.0-8080-exec-38][org.nuxeo.ecm.core.storage.sql.SessionImpl] duration_ms:\t1014.70\tQueryFilter(principal=lmatz, limit=149999, offset=0) count total results up to 200\tquery\tSELECT * FROM Domain WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState != 'deleted' ORDER BY dc:title{{RemoteAddr,127.0.0.1}{RequestURL,http://fifthsun.nuxeocloud.com/nuxeo/view_documents.faces}{ServletPath,/view_documents.faces}{SessionID,F8F4E40BF22330CA000C0F8A271B0205.nuxeo}{UserPrincipal,lmatz}{tx,2cffffffe8560000047544d4944}}", "attributes": {} } }
whereas a normal message received by Datadog should look like:
{ "id": "xxxxx", "content": { "timestamp": "2020-07-27T17:46:27.731Z", "tags": [ "service:nuxeo", "source:nuxeo", ], "host": "xxxxxxxxxxxxxx", "service": "xxxxxx", "message": "Asset has changed", "attributes": { "class": "org.nuxeo.somepackage.SomeClass", "@timestamp": "2020-07-27T17:46:27.731Z", "source_host": "xxxx", "file": "Bla.java", "method": "handleEvent", "level": "WARN", "line_number": "42", "thread_name": "http-nio-0.0.0.0-8080-exec-33", "@version": 1, "logger_name": "org.nuxeo....", "mdc": { "tx": "5663430000047544d4944", "ServletPath": "/view_documents.faces", "SessionID": "3A9C51B2E52616F7DBDFB78473285E5E.nuxeo", "RemoteAddr": "127.0.0.1" } } } }
This prevent analyzing those logs in production.