Hi, all!
Could we please remove stacktrace information for production usage?
It isn't useful for day-to-day work, and need some time to understand how to improve app logs handling.
docker usage (version:7.4.1)
I'm not sure that I understand the request. Are you requesting a feature such that a user could disable the logging of stacktraces?
I mean, is there any reason to turn on trace logging for production usage?
it works for bulk insert in this way:
first console
$ docker run -t --rm -e "discovery.type=single-node" elasticsearch:7.4.1
second console
$ cat request1.txt
{ "index" : { "_index" : "test" } }
{ "user_id" : 1111 }
$ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@request1.txt"; echo
$ cat request2.txt
{ "index" : { "_index" : "test" } }
{ "user_id" : "sdd" }
$ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@request2.txt"; echo
response really cool with explanation
{"took":15,"errors":true,"items":[{"index":{"_index":"test","_type":"_doc","_id":"QQ8Akm4BNK3DsdKq9CeP","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [user_id] of type [long] in document with id 'QQ8Akm4BNK3DsdKq9CeP'. Preview of field's value: 'sdd'","caused_by":{"type":"illegal_argument_exception","reason":"For input string: \"sdd\""}}}}]}
but in console1 we can see long message with stacktrace:
{"type": "server", "timestamp": "2019-11-22T07:26:06,484Z", "level": "DEBUG", "component": "o.e.a.b.TransportShardBulkAction", "cluster.name": "docker-cluster", "node.name": "27e22f06ea10", "message": "[test][0] failed to execute bulk item (index) index {[test][_doc][QQ8Akm4BNK3DsdKq9CeP], source[{ \"user_id\" : \"sdd\" }]}", "cluster.uuid": "qZMyH0gSRQSRlAa0vAzkkA", "node.id": "GmCHMW46QQqb6oIJ-I9jjw" ,
"stacktrace": ["org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [user_id] of type [long] in document with id ...
....long long stacktrace here...
It would be nice if stacktrace info was disabled by default (in production)
I see. We have no intention of disabling stacktraces by default. Stacktraces are incredibly valuable to us when chasing bugs, and helping users diagnose issues. Not having them by default would be a massive hinderance to our ability to do this.
hope someday elasticsearch will have more users than errors :(
Most helpful comment
hope someday elasticsearch will have more users than errors :(