mirror of https://gitee.com/bigwinds/arangodb
Feature/turn on unique log ids (#8572)
* turn on unique log message IDs by default * add missing feature documentation * update CHANGELOG
This commit is contained in:
parent
80a6e621ee
commit
dbcc9767fa
12
CHANGELOG
12
CHANGELOG
|
@ -3,12 +3,12 @@ devel
|
||||||
|
|
||||||
* added "--log.ids" option to arangod
|
* added "--log.ids" option to arangod
|
||||||
|
|
||||||
The default value for this option is `false`. Setting the option to `true`
|
The default value for this option is `true`. Setting the option to `false`
|
||||||
will embed unique ids into all log messages generated in arangod code. This
|
will prevent embedding unique log ids into all log messages generated by
|
||||||
allows for easy access to the location in the source code from which the
|
ArangoDB C++ code. The unique ids allow for easy access to the location in
|
||||||
message originates. This should help customers to configure custom
|
the source code from which a message originates. This should help customers
|
||||||
monitoring/alerting based on specific log id occurrences and will also be
|
to configure custom monitoring/alerting based on specific log id occurrences
|
||||||
helpful for support and development in identifying problems.
|
and will also be helpful for support and development in identifying problems.
|
||||||
|
|
||||||
* fixed issue #8294: wrong equals behaviour on arrays with ArangoSearch
|
* fixed issue #8294: wrong equals behaviour on arrays with ArangoSearch
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,13 @@ reduce memory usage and, for some queries, also execution time for the sorting.
|
||||||
If the optimization is applied, it will show as "sort-limit" rule in the query execution
|
If the optimization is applied, it will show as "sort-limit" rule in the query execution
|
||||||
plan.
|
plan.
|
||||||
|
|
||||||
|
### Index Hints in AQL
|
||||||
|
|
||||||
|
Users may now take advantage of the `indexHint` inline query option to override
|
||||||
|
the internal optimizer decision regarding which index to use to serve content
|
||||||
|
from a given collection. The index hint works with the named indices feature
|
||||||
|
above, making it easy to specify which index to use.
|
||||||
|
|
||||||
### Sorted primary index (RocksDB engine)
|
### Sorted primary index (RocksDB engine)
|
||||||
|
|
||||||
The query optimizer can now make use of the sortedness of primary indexes if the
|
The query optimizer can now make use of the sortedness of primary indexes if the
|
||||||
|
@ -280,12 +287,37 @@ name _cannot_ be changed after index creation. No two indices on the same
|
||||||
collection may share the same name, but two indices on different collections
|
collection may share the same name, but two indices on different collections
|
||||||
may.
|
may.
|
||||||
|
|
||||||
### Index Hints in AQL
|
### ID values in log messages
|
||||||
|
|
||||||
|
By default, ArangoDB and its client tools now show a 5 digit unique ID value in
|
||||||
|
any of their log messages, e.g.
|
||||||
|
|
||||||
|
2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!.
|
||||||
|
|
||||||
|
In this message, the `cf3f4` is the message's unique ID value. ArangoDB users can
|
||||||
|
use this ID to build custom monitoring or alerting based on specific log ID values.
|
||||||
|
Existing log ID values are supposed to stay constant in future releases of arangod.
|
||||||
|
|
||||||
|
Additionally the unique log ID values can be used by the ArangoDB support to find
|
||||||
|
out which component of the product exactly generated a log message. The IDs also
|
||||||
|
make disambiguation of identical log messages easier.
|
||||||
|
|
||||||
|
The presence of these ID values in log messages may confuse custom log message filtering
|
||||||
|
or routing mechanisms that parse log messages and that rely on the old log message
|
||||||
|
format.
|
||||||
|
|
||||||
|
This can be fixed adjusting any existing log message parsers and making them aware
|
||||||
|
of the ID values. The ID values are always 5 byte strings, consisting of the characters
|
||||||
|
`[0-9a-f]`. ID values are placed directly behind the log level (e.g. `INFO`) for
|
||||||
|
general log messages that do not contain a log topic, and directly behind the log
|
||||||
|
topic for messages that contain a topic, e.g.
|
||||||
|
|
||||||
|
2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!.
|
||||||
|
2019-03-25T21:23:16Z [8144] INFO {authentication} [3844e] Authentication is turned on (system only), authentication for unix sockets is turned on
|
||||||
|
|
||||||
|
Alternatively, the log IDs can be suppressed in all log messages by setting the startup
|
||||||
|
option `--log.ids false` when starting arangod or any of the client tools.
|
||||||
|
|
||||||
Users may now take advantage of the `indexHint` inline query option to override
|
|
||||||
the internal optimizer decision regarding which index to use to serve content
|
|
||||||
from a given collection. The index hint works with the named indices feature
|
|
||||||
above, making it easy to specify which index to use.
|
|
||||||
|
|
||||||
Internal
|
Internal
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -6,6 +6,34 @@ upgrading to ArangoDB 3.5, and adjust any client programs if necessary.
|
||||||
|
|
||||||
The following incompatible changes have been made in ArangoDB 3.5:
|
The following incompatible changes have been made in ArangoDB 3.5:
|
||||||
|
|
||||||
|
ID values in log messages
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
By default, ArangoDB and its client tools now show a 5 digit unique ID value in
|
||||||
|
any of their log messages, e.g.
|
||||||
|
|
||||||
|
2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!.
|
||||||
|
|
||||||
|
In this message, the `cf3f4` is the message's unique ID value. ArangoDB users can
|
||||||
|
use this ID to build custom monitoring or alerting based on specific log ID values.
|
||||||
|
|
||||||
|
The presence of these ID values in log messages may confuse custom log message filtering
|
||||||
|
or routing mechanisms that parse log messages and that rely on the old log message
|
||||||
|
format.
|
||||||
|
|
||||||
|
This can be fixed adjusting any existing log message parsers and making them aware
|
||||||
|
of the ID values. The ID values are always 5 byte strings, consisting of the characters
|
||||||
|
`[0-9a-f]`. ID values are placed directly behind the log level (e.g. `INFO`) for
|
||||||
|
general log messages that do not contain a log topic, and directly behind the log
|
||||||
|
topic for messages that contain a topic, e.g.
|
||||||
|
|
||||||
|
2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!.
|
||||||
|
2019-03-25T21:23:16Z [8144] INFO {authentication} [3844e] Authentication is turned on (system only), authentication for unix sockets is turned on
|
||||||
|
|
||||||
|
Alternatively, the log IDs can be suppressed in all log messages by setting the startup
|
||||||
|
option `--log.ids false` when starting arangod or any of the client tools.
|
||||||
|
|
||||||
|
|
||||||
Startup options
|
Startup options
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,9 @@ void LoggerFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
|
||||||
options->addOption("--log.use-microtime", "use microtime instead",
|
options->addOption("--log.use-microtime", "use microtime instead",
|
||||||
new BooleanParameter(&_useMicrotime));
|
new BooleanParameter(&_useMicrotime));
|
||||||
|
|
||||||
options->addOption("--log.ids", "log unique message ids", new BooleanParameter(&_showIds));
|
options->addOption("--log.ids", "log unique message ids",
|
||||||
|
new BooleanParameter(&_showIds))
|
||||||
|
.setIntroducedIn(30500);
|
||||||
|
|
||||||
options->addOption("--log.role", "log server role", new BooleanParameter(&_showRole));
|
options->addOption("--log.role", "log server role", new BooleanParameter(&_showRole));
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class LoggerFeature final : public application_features::ApplicationFeature {
|
||||||
bool _foregroundTty = false;
|
bool _foregroundTty = false;
|
||||||
bool _forceDirect = false;
|
bool _forceDirect = false;
|
||||||
bool _useMicrotime = false;
|
bool _useMicrotime = false;
|
||||||
bool _showIds = false;
|
bool _showIds = true;
|
||||||
bool _showRole = false;
|
bool _showRole = false;
|
||||||
bool _logRequestParameters = true;
|
bool _logRequestParameters = true;
|
||||||
bool _supervisor = false;
|
bool _supervisor = false;
|
||||||
|
|
Loading…
Reference in New Issue