Invantive Trace voortaan in NDJSON-formaat

Vanaf versie 20.2.70 wordt het tekst-gebaseerde opslagformaat voor Invantive Trace vervangen door het NDJSON-formaat. Dankzij het NDJSON-formaat is het eenvoudiger om grote aantallen tracebestanden te doorzoeken. Ook wordt het eenvoudig om tracebestanden te laden in Amazon CloudWatch en ElasticSearch.

Het NDJSON-formaat heeft een regel per melding in JSON-formaat:

{"Message":"Invantive trace forwarder started.","MessageCode":null,"Occurred":"2021-10-21T17:05:46.8931234Z","Id":2,"ThreadId":1,"SessionId":"WPF-OnStartup-23e28338-f688-4df9-bbad-5d66ca2ea5de","PoolIdentityId":null,"CallingProviderAlias":null}

De tracebestanden kunnen ook opgevraagd worden via Invantive SQL met bijvoorbeeld:

select fle.file_path
,      msg.id
,      msg.thread_id
,      msg.session_id
,      msg.pool_identity_id
,      msg.message_code
,      msg.occurred_utc
,      msg.message_text
,      msg.calling_provider_alias
from   SYSTEMPROPERTIES@DataDictionary spy
join   files@os(spy.value, 'invantive-trace*.ndjson', true) fle
join   ndjsontable
       ( passing file fle.file_path
         ignore invalid line
         columns id                     int64     not null label 'ID'             path 'Id'
         ,       thread_id              int32     not null label 'Thread ID'      path 'ManagedThreadId'
         ,       session_id             varchar2  not null label 'Session ID'     path 'SessionId'
         ,       pool_identity_id       varchar2      null label 'Pool Identity'  path 'PoolIdentityId'
         ,       message_code           varchar2      null label 'Message Code'   path 'MessageCode'
         ,       occurred_utc           timestamp not null label 'Occurred (UTC)' path 'OccurredUtc'
         ,       message_text           varchar2      null label 'Message'        path 'Message'
         ,       calling_provider_alias varchar2      null label 'Alias'          path 'CallingProviderAlias'
         ,       machine_name_full      varchar2      null label 'Machine'        path 'MachineNameFull'
         ,       user_logon_code        varchar2      null label 'Logon Code'     path 'UserLogonCodeWithDomain'
         ,       process_id             int           null label 'Process ID'     path 'ProcessId'
         ,       uid                    guid          null label 'UID'            path 'Uid'
         ,       gui_action             varchar2      null label 'GUI Action'     path 'GuiAction'
         ,       gui_ip_address         varchar2      null label 'GUI IP Address' path 'GuiExternalIpAddress'
         ,       gui_language           varchar2      null label 'GUI Language'   path 'GuiLanguage'
         ,       gui_module             varchar2      null label 'GUI Module'     path 'GuiModuleName'
         ,       gui_version            varchar2      null label 'GUI Version'    path 'GuiModuleVersion'
         ,       gui_os_user            varchar2      null label 'GUI OS User'    path 'GuiOsUser'
         ,       gui_user               varchar2      null label 'GUI User'       path 'GuiUser'
       )
       msg
where  spy.name = 'environment-trace-log-folder'
limit 10000
order
by     fle.file_path
,      msg.id